choo121600 commented on code in PR #63579:
URL: https://github.com/apache/airflow/pull/63579#discussion_r2936270553


##########
dev/breeze/src/airflow_breeze/utils/confirm.py:
##########
@@ -88,38 +88,37 @@ def user_confirm(
         allowed_answers = allowed_answers.replace(default_answer.value, 
default_answer.value.upper())
 
     prompt = f"\n{message} \nPress {allowed_answers}: "
-    get_console().print(prompt, end="")
 
-    try:
-        ch = _read_char()
-    except (KeyboardInterrupt, EOFError):
-        get_console().print()
-        if quit_allowed:
-            return Answer.QUIT
-        sys.exit(1)
+    while True:

Review Comment:
   Thanks for review :)
   I think using a flag might be unnecessary here since the loop is quite 
simple. The function either returns on a valid key or prints a warning and 
re-prompts. The intended behavior is to keep asking until the user makes an 
explicit choice (y/n/q), so the loop should only exit on valid input.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to