diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-09-10 21:30:36 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-09-10 21:30:36 +0100 |
| commit | f380b960018e5b81b6a10834822fa962bfab2c7b (patch) | |
| tree | ddae16a6ed03a23d89f639be86a5f9fecd0d5fc1 /wscript | |
| parent | 5d8a1583a57ae30c4f8ffbe0a7877dd7ca20236b (diff) | |
Fix missing version string when Popen communicate returns byte strings.
Diffstat (limited to 'wscript')
| -rw-r--r-- | wscript | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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: |
