From edcca61625d0ba7bdaf4b49b378436db896c1375 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Jan 02 2022 02:52:10 +0000 Subject: Fix prompt for existing reviews In #429, I tried to fix the capitalization, but it was not quite correct. The default is actually no if you enter an empty input. _However_, it is also yes if you enter _anything_ that doesn't start with an 'n'. I think this is unsafe, so instead make the 'y' case the explicit one, and change the capitalization accordingly. --- diff --git a/src/FedoraReview/create_review.py b/src/FedoraReview/create_review.py index 2fd59d1..0ed4e52 100644 --- a/src/FedoraReview/create_review.py +++ b/src/FedoraReview/create_review.py @@ -349,8 +349,8 @@ class ReviewRequest(object): print("\t", bug.url) if bugbz: - usr_inp = input("Do you want to proceed anyway? [Y/n]") - if usr_inp == "" or usr_inp.lower().startswith("n"): + usr_inp = input("Do you want to proceed anyway? [y/N]") + if not usr_inp.lower().startswith("y"): raise FedoraCreateReviewError() def login_bz(self):