Skip to content

Commit

Permalink
Cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-beloff committed May 12, 2023
1 parent 6176b51 commit 0830d0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/scs_host/comms/stdio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 0830d0a

Please sign in to comment.