From 9c35b770a239589ab32a27e1ff4942837b6b68bb Mon Sep 17 00:00:00 2001 From: Mo8it Date: Mon, 9 May 2022 02:11:28 +0200 Subject: [PATCH] Seperate formatting from constraints checking --- advlabdb/scripts/terminal_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/advlabdb/scripts/terminal_utils.py b/advlabdb/scripts/terminal_utils.py index fe7786a..d094b61 100644 --- a/advlabdb/scripts/terminal_utils.py +++ b/advlabdb/scripts/terminal_utils.py @@ -69,17 +69,17 @@ def validating_input( while ans is None or not adj_check_constraints_function(ans): if not first_run: - print("Invalid input!") + print("Invalid input!\n") else: first_run = False ans = input(prompt) try: - ans = format_function(ans) + formatted_ans = format_function(ans) except Exception as ex: ans = None - return ans + return formatted_ans def confirm(prompt):