From 0830d0a0f33e4683a40e03c7a11e3cd9fc535b5d Mon Sep 17 00:00:00 2001 From: Bruno Beloff Date: Fri, 12 May 2023 09:22:52 +0100 Subject: [PATCH] Cleaning --- src/scs_host/comms/stdio.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scs_host/comms/stdio.py b/src/scs_host/comms/stdio.py index 076eff0..43867fd 100644 --- a/src/scs_host/comms/stdio.py +++ b/src/scs_host/comms/stdio.py @@ -28,16 +28,16 @@ class StdIO(ProcessComms): # ---------------------------------------------------------------------------------------------------------------- @staticmethod - def prompt(request, default=''): + def prompt(request, default=None): try: termios.tcflush(sys.stdin, termios.TCIOFLUSH) # flush stdin except termios.error: pass try: - prompt_str = request % default if default else request + prompt_str = request + ' (%s): ' % default if default else request + ': ' except TypeError: - prompt_str = request + prompt_str = request + ': ' # no % format in request string line = input(prompt_str).strip()