Skip to content

Commit

Permalink
Python 3.4 compati
Browse files Browse the repository at this point in the history
  • Loading branch information
iBug committed Aug 2, 2018
1 parent 4467618 commit 4b32657
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions globalvars.py
Expand Up @@ -17,7 +17,7 @@

def git_commit_info():
try:
data = sp.check_output(['git', 'log', '-1', '--pretty=%h%n%H%n%an%n%s'], stderr=sp.STDOUT, encoding='utf-8')
data = sp.check_output(['git', 'log', '-1', '--pretty=%h%n%H%n%an%n%s'], stderr=sp.STDOUT).decode('utf-8')
except sp.CalledProcessError as e:
raise OSError("Git error:\n" + e.output) from e
short_id, full_id, author, message = data.strip().split("\n")
Expand All @@ -26,7 +26,7 @@ def git_commit_info():

def git_status():
try:
return sp.check_output(['git', 'status'], stderr=sp.STDOUT, encoding='utf-8').strip()
return sp.check_output(['git', 'status'], stderr=sp.STDOUT).decode('utf-8').strip()
except sp.CalledProcessError as e:
raise OSError("Git error:\n" + e.output) from e

Expand Down

0 comments on commit 4b32657

Please sign in to comment.