diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-26 22:29:14 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-26 22:29:14 +0000 |
commit | 4ef777e8a4bebda665adb30c6631b4551e6b25b6 (patch) | |
tree | 279badd346ecf35450c99ae965a830e9a10f5941 /build | |
parent | 4e85c1127c87f1a9b9dd47292eea9bf36bb763a2 (diff) | |
download | chromium_src-4ef777e8a4bebda665adb30c6631b4551e6b25b6.zip chromium_src-4ef777e8a4bebda665adb30c6631b4551e6b25b6.tar.gz chromium_src-4ef777e8a4bebda665adb30c6631b4551e6b25b6.tar.bz2 |
lastchange: don't use git rev-parse output when it fails
If you weren't using SVN or Git, but you had Git installed,
we still thought you were using Git and had empty info for
the version number.
Review URL: http://codereview.chromium.org/6308016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72706 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-x | build/util/lastchange.py | 5 |
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): |