Skip to content

Commit 27c2461

Browse files
committed
Fix wrong value (out of range, etc) entry handling
1 parent f3d6c68 commit 27c2461

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ps_fuzz/interactive_mode.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def show(cls, state: AppConfig):
106106
print("----------------------------------------------------")
107107
result = inquirer.prompt([
108108
inquirer.Text('debug_level',
109-
message="Debug Level (0-3)",
109+
message="Debug Level (0-2) (0=warnings and errors; 1 = normal; 2 = verbose)",
110110
default=str(state.debug_level),
111111
validate=lambda _, x: x.isdigit() and int(x) > 0
112112
),
@@ -171,6 +171,8 @@ def interactive_shell(state: AppConfig):
171171
except KeyboardInterrupt:
172172
print("\nOperation cancelled by user.")
173173
continue
174+
except ValueError as e:
175+
logger.warning(f"{colorama.Fore.RED}{colorama.Style.BRIGHT}Wrong value:{colorama.Style.RESET_ALL} {e}")
174176
except Exception as e:
175177
logger.error(f"An error occurred: {e}", exc_info=True)
176178
break

0 commit comments

Comments
 (0)