Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: build/util/lastchange.py

Issue 6308016: lastchange: don't use git rev-parse output when it fails (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/util/lastchange.py
diff --git a/build/util/lastchange.py b/build/util/lastchange.py
index 8376b543802738a56224da75b3874370851265e2..7c34fbea3b41f50014c36858b12c2613d9cefc50 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):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698