py/makeversionhdr.py: Use returncode attr to be Python2.7 compat.

This commit is contained in:
Damien George 2015-08-12 23:28:16 +01:00
parent b7d59060e2
commit 94ef8879cd
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ def get_version_info_from_git():
try:
git_tag = subprocess.check_output(["git", "describe", "--dirty", "--always"], stderr=subprocess.STDOUT, universal_newlines=True).strip()
except subprocess.CalledProcessError as er:
if er.args[0] == 128:
if er.returncode == 128:
# git exit code of 128 means no repository found
return None
git_tag = ""