diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-24 23:30:15 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-24 23:30:15 +0000 |
commit | 6ea03316725dfd38af1f507dba623e807b762580 (patch) | |
tree | 1c2d706cbe7233f1d98ba2b3adaa0e91a4f8aa35 /build | |
parent | 27c9c76cf55f6628259620d09d3bca2b86012011 (diff) | |
download | chromium_src-6ea03316725dfd38af1f507dba623e807b762580.zip chromium_src-6ea03316725dfd38af1f507dba623e807b762580.tar.gz chromium_src-6ea03316725dfd38af1f507dba623e807b762580.tar.bz2 |
lastchange: wrap another subprocess call in a try block
Avoids throwing an exception when git isn't installed.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72418 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-x | build/util/lastchange.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/build/util/lastchange.py b/build/util/lastchange.py index 3718c54..a530474 100755 --- a/build/util/lastchange.py +++ b/build/util/lastchange.py @@ -25,11 +25,14 @@ def IsGitSVN(directory): # To test whether git-svn has been set up, query the config for any # svn-related configuration. This command exits with an error code # if there aren't any matches, so ignore its output. - status = subprocess.call(['git', 'config', '--get-regexp', '^svn'], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - cwd=directory) - return status == 0 + try: + status = subprocess.call(['git', 'config', '--get-regexp', '^svn'], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + cwd=directory) + return status == 0 + except OSError: + return False def FetchSVNRevision(command, directory): |