Commit 94ef8879 authored by Damien George's avatar Damien George
Browse files

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

parent b7d59060
...@@ -23,7 +23,7 @@ def get_version_info_from_git(): ...@@ -23,7 +23,7 @@ def get_version_info_from_git():
try: try:
git_tag = subprocess.check_output(["git", "describe", "--dirty", "--always"], stderr=subprocess.STDOUT, universal_newlines=True).strip() git_tag = subprocess.check_output(["git", "describe", "--dirty", "--always"], stderr=subprocess.STDOUT, universal_newlines=True).strip()
except subprocess.CalledProcessError as er: except subprocess.CalledProcessError as er:
if er.args[0] == 128: if er.returncode == 128:
# git exit code of 128 means no repository found # git exit code of 128 means no repository found
return None return None
git_tag = "" git_tag = ""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment