diff options
author | 2021-04-12 11:07:43 -0700 | |
---|---|---|
committer | 2021-04-13 23:30:52 +0000 | |
commit | d909a1912cb071d4d78e84ed41571f323ba0641d (patch) | |
tree | 67e7872ced0100b8446ca561652b232c108c774a | |
parent | e6a0a20693966fc89dd1e52cdbce063465d9fe51 (diff) |
Make bisect_profile more resiliant to user input
We would not check that the user actually enters a response. This
could cause the bisect to fail prematurely.
Test: manual
Change-Id: I6b9ab373e74a6594158c42ebe11b242eabfd0921
-rwxr-xr-x | tools/bisect_profile.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/bisect_profile.py b/tools/bisect_profile.py index 7d323b7186..21018e0a8e 100755 --- a/tools/bisect_profile.py +++ b/tools/bisect_profile.py @@ -106,9 +106,9 @@ def get_answer(args): while True: answer = input("Does the file at {} cause the issue (y/n):".format( args.output_file)) - if answer[0].lower() == "y": + if len(answer) >= 1 and answer[0].lower() == "y": return "y" - elif answer[0].lower() == "n": + elif len(answer) >= 1 and answer[0].lower() == "n": return "n" else: print("Please enter 'y' or 'n' only!") |