Skip to content

Commit

Permalink
[version] Improved get_version to follow PEP440
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed May 18, 2017
1 parent 4d18ae5 commit 845ed83
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion netjsonconfig/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ def get_version():
version = '%s pre-alpha' % version
else:
if VERSION[3] != 'final':
version = '%s %s' % (version, VERSION[3])
try:
rev = VERSION[4]
except IndexError:
rev = 0
version = '%s%s%s' % (version, VERSION[3][0:1], rev)
return version

0 comments on commit 845ed83

Please sign in to comment.