summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-10 01:01:57 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-10 01:01:57 +0000
commit79f14744774bbb97946c0cddedb46c390702c432 (patch)
treebff65fab15852da7c1fb86e296630469d054c95d /build
parent1c4a27a1e520211657891fc91eb2ece2a1340e7b (diff)
downloadchromium_src-79f14744774bbb97946c0cddedb46c390702c432.zip
chromium_src-79f14744774bbb97946c0cddedb46c390702c432.tar.gz
chromium_src-79f14744774bbb97946c0cddedb46c390702c432.tar.bz2
build-bisect: don't crash on bad input to the good/bad prompt
Review URL: http://codereview.chromium.org/786001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41105 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-xbuild/build-bisect.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/build/build-bisect.py b/build/build-bisect.py
index aeec7b3..1c6b416 100755
--- a/build/build-bisect.py
+++ b/build/build-bisect.py
@@ -135,14 +135,14 @@ def TryRevision(rev, profile, args):
except Exception, e:
pass
+
def AskIsGoodBuild(rev):
- """Annoyingly ask the user whether build |rev| is good or bad."""
+ """Ask the user whether build |rev| is good or bad."""
+ # Loop until we get a response that we can parse.
while True:
- check = raw_input("\nBuild %d is [(g)ood/(b)ad]: " % int(rev))[0]
- if (check == "g" or check == "b"):
- return (check == "g")
- else:
- print("Just answer the question...")
+ response = raw_input("\nBuild %d is [(g)ood/(b)ad]: " % int(rev))
+ if response and response in ("g", "b"):
+ return response == "g"
def main():
usage = ('%prog [options] [-- chromium-options]\n'