Skip to content

Commit

Permalink
Merge pull request #70 from zenotech/python3-patch
Browse files Browse the repository at this point in the history
decode to utf 8
  • Loading branch information
jappa authored Nov 5, 2019
2 parents f8143df + 37fd803 commit 8291b59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mycluster/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ def call_git_describe(abbrev=4):
if return_code == 0:
p.stderr.close()
line = p.stdout.readlines()[0]
return str(line.strip())
return line.strip().decode("utf-8")
else:
p.stderr.close()
p.stdout.close()
p = Popen(['git', 'describe', '--abbrev=%d' % abbrev],
stdout=PIPE, stderr=PIPE)
p.stderr.close()
line = p.stdout.readlines()[0]
return str(line.strip())
return line.strip().decode("utf-8")
except Exception as e:
return None

Expand Down

0 comments on commit 8291b59

Please sign in to comment.