Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation and sanity improvements #179

Merged
merged 3 commits into from
Jun 21, 2023
Merged

Conversation

oliv3r
Copy link
Contributor

@oliv3r oliv3r commented Jun 21, 2023

Two small commits to improve quality of life.

Python 3.10 complains about isSet being deprecated, there's a drop-in replacement in the form of is_set.

The magic to store the hardcoded last0503 message fails if the path also contains /se already. We can do better here. Even better would have been to store this in /tmp or in /var/lib/semonitor, as storing it in the (distribution) source directory is a bit weird.

oliv3r added 2 commits June 21, 2023 09:19
The `isSet` is deprecated and an alias for `is_set`. Use that instead to
avoid deprecation warnings.

Signed-off-by: Olliver Schinagl <[email protected]>
The path replacement function tries to remove `/se` from the full path.
However, if the path already contains `/se`, such as for example in
`/solaredge/semonitor/se/msg.py` the path gets completely messed up.

Instead, by using python's `removesuffix`, we get what we wanted.

Signed-off-by: Olliver Schinagl <[email protected]>
@oliv3r oliv3r mentioned this pull request Jun 21, 2023
@ericbuehl ericbuehl merged commit 673c06d into jbuehl:master Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants