Merge "Log a warning when reset fails"
This commit is contained in:
commit
bed34acf2e
|
@ -1935,7 +1935,13 @@ def reset_cmdline():
|
|||
# only try to reset if stdout is a terminal, skip if not (e.g. CI)
|
||||
if not sys.stdout.isatty():
|
||||
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()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue