Skip to content

Commit 092eedc

Browse files
authored
Merge pull request #44 from mbuesch/versionfixes
Small fixes for version handling
2 parents 9eb9935 + e7f09b6 commit 092eedc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

programmer/tinyprog/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
__version__ = get_distribution(__name__).version
1919
except DistributionNotFound:
2020
# package is not installed
21-
pass
21+
__version__ = "unknown"
2222

2323
try:
2424
from .full_version import __full_version__
25-
assert __full_version__
26-
except (ImportError, AssertionError):
25+
if not __full_version__:
26+
raise ValueError
27+
except (ImportError, ValueError):
2728
__full_version__ = "unknown"
2829

2930

0 commit comments

Comments
 (0)