Fix crash caused by unreachable SAL server by adding more SAL options#42
Open
skuba31 wants to merge 1 commit intocherab:developmentfrom
Open
Fix crash caused by unreachable SAL server by adding more SAL options#42skuba31 wants to merge 1 commit intocherab:developmentfrom
skuba31 wants to merge 1 commit intocherab:developmentfrom
Conversation
jacklovell
reviewed
Feb 6, 2026
Comment on lines
+15
to
+22
| def get_jet_sal(host: str = SAL_SERVER, **kwargs) -> SALClient: | ||
| """Creates a SALClient instance connected to `host` if provided. | ||
| By default uses env variable `JET_SAL_SERVER` if set, `https://sal.jetdata.eu` otherwise. | ||
| """ | ||
| return SALClient(host=host, **kwargs) | ||
|
|
||
|
|
||
| def __getattr__(name: str): |
Member
There was a problem hiding this comment.
Unless Github's formatting is off, I think you're missing some indentation here: these functions should be class methods.
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.
Fixes crash when importing cherab.jet while SAL server is unreachable #40
Adds new subclass and function that check sal reachability only on instantiation or call so that the import of package is unaffectd.
Also adds a custom getattr method of cherab.jet.sal module that allows to use former notation
from cherab.jet.sal import sal. Usage of this notation is discouraged as it results in the connection error being raised if SAL server is not reachable on import.