summaryrefslogtreecommitdiffstats
path: root/tools/bisect-builds.py
diff options
context:
space:
mode:
authorpshenoy@chromium.org <pshenoy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-23 16:44:14 +0000
committerpshenoy@chromium.org <pshenoy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-23 16:44:14 +0000
commit1f99f4d27ca48c7b402366c13de2beb821d452fe (patch)
treeb4a5be23d20e8e52b5828ede0df329da19fca532 /tools/bisect-builds.py
parent6f9bc6eaec4053da0dc2727b297a4f9c9b897580 (diff)
downloadchromium_src-1f99f4d27ca48c7b402366c13de2beb821d452fe.zip
chromium_src-1f99f4d27ca48c7b402366c13de2beb821d452fe.tar.gz
chromium_src-1f99f4d27ca48c7b402366c13de2beb821d452fe.tar.bz2
Fix bisect-builds.py crash when no bad build is given and GetSVNRevisionFromGitHash returns None.
Script crashes with "TypeError: int() argument must be a string or a number, not 'NoneType'" message. The fix is to use 'raise ValueError' instead of returning None. BUG=None NOTRY=True Review URL: https://codereview.chromium.org/408253004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284953 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/bisect-builds.py')
-rwxr-xr-xtools/bisect-builds.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/bisect-builds.py b/tools/bisect-builds.py
index ad1907b..2ed0967 100755
--- a/tools/bisect-builds.py
+++ b/tools/bisect-builds.py
@@ -269,7 +269,7 @@ class PathContext(object):
if result:
return result.group(1)
print 'Failed to get svn revision number for %s' % git_sha1
- return None
+ raise ValueError
def _GetSVNRevisionFromGitHashFromGitCheckout(self, git_sha1, depot):
def _RunGit(command, path):
@@ -294,7 +294,7 @@ class PathContext(object):
(git_output, return_code) = _RunGit(command, path)
if not return_code:
return git_output.strip('\n')
- return None
+ raise ValueError
else:
print ('Script should be run from src folder. ' +
'Eg: python tools/bisect-builds.py -g 280588 -b 280590' +