misc: make get_version compatible with python 3

This commit is contained in:
Frédéric Péters 2018-03-31 20:12:30 +02:00
parent 0adba4abbd
commit 6ff5389ec7
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ def get_version():
p = subprocess.Popen(['git', 'describe', '--dirty', '--match=v*'], stdout=subprocess.PIPE)
result = p.communicate()[0]
if p.returncode == 0:
version = result.split()[0][1:]
version = str(result.split()[0][1:])
version = version.replace('-', '.')
return version
return '0'