Merge "Log a warning when reset fails" into stable/stein
This commit is contained in:
commit
8e4592f0df
|
@ -2042,5 +2042,11 @@ def reset_cmdline():
|
||||||
# only try to reset if stdout is a terminal, skip if not (e.g. CI)
|
# only try to reset if stdout is a terminal, skip if not (e.g. CI)
|
||||||
if not sys.stdout.isatty():
|
if not sys.stdout.isatty():
|
||||||
return
|
return
|
||||||
sys.stdout.write(run_command(['reset', '-I']))
|
output = ''
|
||||||
|
try:
|
||||||
|
output = run_command(['reset', '-I'])
|
||||||
|
except RuntimeError as e:
|
||||||
|
LOG.warning('Unable to reset command line. Try manually running '
|
||||||
|
'"reset" if the command line is broken.')
|
||||||
|
sys.stdout.write(output)
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
Loading…
Reference in New Issue