Conversation
jsongerber
pushed a commit
to jsongerber/python-sagemcom-api
that referenced
this pull request
Nov 8, 2024
…ove code quality (iMicknl#336) This pull request includes several changes to improve error handling, enhance functionality, and update configurations. The most important changes include adding new exception handling for invalid sessions, updating the `postCreateCommand` in the devcontainer, and adding custom funding options. ### Error Handling Improvements: * Added `InvalidSessionException` to handle invalid session errors and updated relevant methods to raise this exception when needed (`sagemcom_api/client.py`, `sagemcom_api/const.py`, `sagemcom_api/exceptions.py`). [[1]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5R32) [[2]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5R46) [[3]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5R220-R225) [[4]](diffhunk://#diff-57cf505b5e01fc69f170c5a1b839fb40b45a97a9c0ebc1fe53f4bd524ae9ac04R10) [[5]](diffhunk://#diff-63c847110513149341a9f7e94d412bfb7c67d79df07a321774a9a2f3329ca34fR4-L43) * Introduced `retry_login` function to retry login on specific exceptions using backoff (`sagemcom_api/client.py`). [[1]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5R58-R62) [[2]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5R260-R270) ### Functional Enhancements: * Modified `get_hosts` method to include `capability-flags` in the options for retrieving hosts (`sagemcom_api/client.py`). * Corrected the nonce generation logic to use the correct range (`sagemcom_api/client.py`). ### Configuration Updates: * Updated `postCreateCommand` in `.devcontainer/devcontainer.json` to include `pre-commit install-hooks` for better pre-commit setup. * Added a custom funding option in `.github/FUNDING.yml` to include a PayPal link.
bakonyiferenc
pushed a commit
to bakonyiferenc/python-sagemcom-api
that referenced
this pull request
Dec 16, 2025
…ove code quality (iMicknl#336) This pull request includes several changes to improve error handling, enhance functionality, and update configurations. The most important changes include adding new exception handling for invalid sessions, updating the `postCreateCommand` in the devcontainer, and adding custom funding options. ### Error Handling Improvements: * Added `InvalidSessionException` to handle invalid session errors and updated relevant methods to raise this exception when needed (`sagemcom_api/client.py`, `sagemcom_api/const.py`, `sagemcom_api/exceptions.py`). [[1]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5R32) [[2]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5R46) [[3]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5R220-R225) [[4]](diffhunk://#diff-57cf505b5e01fc69f170c5a1b839fb40b45a97a9c0ebc1fe53f4bd524ae9ac04R10) [[5]](diffhunk://#diff-63c847110513149341a9f7e94d412bfb7c67d79df07a321774a9a2f3329ca34fR4-L43) * Introduced `retry_login` function to retry login on specific exceptions using backoff (`sagemcom_api/client.py`). [[1]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5R58-R62) [[2]](diffhunk://#diff-052218051094ff1cc2c8352cd555cfb9eb02bf261eb5e635cf73b798809306a5R260-R270) ### Functional Enhancements: * Modified `get_hosts` method to include `capability-flags` in the options for retrieving hosts (`sagemcom_api/client.py`). * Corrected the nonce generation logic to use the correct range (`sagemcom_api/client.py`). ### Configuration Updates: * Updated `postCreateCommand` in `.devcontainer/devcontainer.json` to include `pre-commit install-hooks` for better pre-commit setup. * Added a custom funding option in `.github/FUNDING.yml` to include a PayPal link.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to improve error handling, enhance functionality, and update configurations. The most important changes include adding new exception handling for invalid sessions, updating the
postCreateCommandin the devcontainer, and adding custom funding options.Error Handling Improvements:
InvalidSessionExceptionto handle invalid session errors and updated relevant methods to raise this exception when needed (sagemcom_api/client.py,sagemcom_api/const.py,sagemcom_api/exceptions.py). [1] [2] [3] [4] [5]retry_loginfunction to retry login on specific exceptions using backoff (sagemcom_api/client.py). [1] [2]Functional Enhancements:
get_hostsmethod to includecapability-flagsin the options for retrieving hosts (sagemcom_api/client.py).sagemcom_api/client.py).Configuration Updates:
postCreateCommandin.devcontainer/devcontainer.jsonto includepre-commit install-hooksfor better pre-commit setup..github/FUNDING.ymlto include a PayPal link.