Skip to content

Commit

Permalink
Linter fix for constants.py
Browse files Browse the repository at this point in the history
  • Loading branch information
C0rn3j committed Oct 6, 2024
1 parent dfa2be4 commit e6efa6d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scc/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@
#from importlib.metadata import version, packages_distributions
#distribution_name = packages_distributions()[__package__][0]
# python < 3.10 (Focal, Bullseye)
from importlib.metadata import version, distributions
distribution_name = [dist.metadata["Name"] for dist in distributions() if __package__ in (dist.read_text("top_level.txt") or "").split()][0]
from importlib.metadata import distributions, version

distribution_name = next(dist.metadata["Name"] for dist in distributions() if __package__ in (dist.read_text("top_level.txt") or "").split())

"""
If SC-Controller is updated while daemon is running, DAEMON_VERSION send by
If SC Controller is updated while daemon is running, DAEMON_VERSION send by
daemon will differ one one expected by UI and daemon will be forcefully restarted.
"""
DAEMON_VERSION = version(distribution_name)
Expand Down

0 comments on commit e6efa6d

Please sign in to comment.