Refactor input handling for next action prompt, fixes #105

This commit is contained in:
Rémi GASCOU (Podalirius)
2026-04-24 10:03:17 +02:00
committed by GitHub
parent 23865e79f4
commit 6024441c70
+6 -7
View File
@@ -232,16 +232,15 @@ def execute_tasks(
and not options.always_continue
):
next_action_answer = None
while next_action_answer not in ["C", "S", "X"]:
while True:
next_action_answer = input(
"Continue (C) | Skip this function (S) | Stop exploitation (X) ? "
)
if len(next_action_answer) > 0:
next_action_answer = (
next_action_answer.strip()[
0
].upper()
)
if next_action_answer:
next_action_answer = next_action_answer.strip().upper()
if next_action_answer and next_action_answer[0] in ["C", "S", "X"]:
next_action_answer = next_action_answer[0]
break
if next_action_answer == "C":
pass
elif next_action_answer == "S":