summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-09-10 21:30:36 +0100
committerCarl Hetherington <cth@carlh.net>2018-09-10 21:30:36 +0100
commitf380b960018e5b81b6a10834822fa962bfab2c7b (patch)
treeddae16a6ed03a23d89f639be86a5f9fecd0d5fc1 /wscript
parent5d8a1583a57ae30c4f8ffbe0a7877dd7ca20236b (diff)
Fix missing version string when Popen communicate returns byte strings.
Diffstat (limited to 'wscript')
-rw-r--r--wscript5
1 files changed, 5 insertions, 0 deletions
diff --git a/wscript b/wscript
index f8d9f113..1d35e9ac 100644
--- a/wscript
+++ b/wscript
@@ -43,6 +43,11 @@ APPNAME = 'libdcp'
this_version = subprocess.Popen(shlex.split('git tag -l --points-at HEAD'), stdout=subprocess.PIPE).communicate()[0]
last_version = subprocess.Popen(shlex.split('git describe --tags --abbrev=0'), stdout=subprocess.PIPE).communicate()[0]
+if isinstance(this_version, bytes):
+ this_version = this_version.decode('UTF-8')
+if isinstance(last_version, bytes):
+ last_version = last_version.decode('UTF-8')
+
if this_version == '':
VERSION = '%sdevel' % last_version[1:].strip()
else: