ui.py: line_input(): restore stderr flush for test suite

This commit is contained in:
The MMGen Project 2023-09-26 09:38:10 +00:00
commit 994e1b4f40
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2

View file

@ -60,6 +60,7 @@ def line_input(cfg,prompt,echo=True,insert_txt='',hold_protect=True):
if cfg.test_suite_popen_spawn:
msg(prompt)
sys.stderr.flush() # required by older Pythons (e.g. v3.7)
reply = os.read(0,4096).decode().rstrip('\n') # strip NL to mimic behavior of input()
elif not sys.stdin.isatty():
msg_r(prompt)