mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Cast __version_info__
elements to int
's.
This commit is contained in:
parent
eb8ef522c0
commit
1e4a4917ae
@ -3,6 +3,7 @@ import sys
|
|||||||
__version_info__ = (0, 10, 4)
|
__version_info__ = (0, 10, 4)
|
||||||
__version__ = '.'.join(map(str, __version_info__))
|
__version__ = '.'.join(map(str, __version_info__))
|
||||||
|
|
||||||
|
|
||||||
# If we can get a version from Git use that instead, otherwise carry on
|
# If we can get a version from Git use that instead, otherwise carry on
|
||||||
try:
|
try:
|
||||||
import subprocess
|
import subprocess
|
||||||
@ -15,10 +16,13 @@ try:
|
|||||||
out, err = p.communicate()
|
out, err = p.communicate()
|
||||||
if out:
|
if out:
|
||||||
__version__ = '{0}'.format(out.strip().lstrip('v'))
|
__version__ = '{0}'.format(out.strip().lstrip('v'))
|
||||||
__version_info__ = tuple(__version__.split('-', 1)[0].split('.'))
|
__version_info__ = tuple(
|
||||||
|
[int(i) for i in __version__.split('-', 1)[0].split('.')]
|
||||||
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def versions_report():
|
def versions_report():
|
||||||
libs = (
|
libs = (
|
||||||
("Jinja2", "jinja2", "__version__"),
|
("Jinja2", "jinja2", "__version__"),
|
||||||
|
Loading…
Reference in New Issue
Block a user