summaryrefslogtreecommitdiffstats
path: root/build/util/lastchange.py
diff options
context:
space:
mode:
Diffstat (limited to 'build/util/lastchange.py')
-rwxr-xr-xbuild/util/lastchange.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/build/util/lastchange.py b/build/util/lastchange.py
index 8376b54..7c34fbe 100755
--- a/build/util/lastchange.py
+++ b/build/util/lastchange.py
@@ -41,7 +41,10 @@ def FetchGitRevision(directory):
cwd=directory)
except OSError:
return None
- return VersionInfo('git', 'git', proc.stdout.read().strip()[:7])
+ output = proc.communicate()[0].strip()
+ if proc.returncode == 0 and output:
+ return VersionInfo('git', 'git', output[:7])
+ return None
def FetchSVNRevision(directory):