Log a warning when reset fails
We attempt a reset but if the installation is being run in a non-tty friendly way, reset may fail. Since this isn't really a blocking issue we shouldn't fail out of the installation but rather log a warning indicating that the user may need to perform some action. Change-Id: I26f41457b712810b54d4108f735a1db3c88ae8ce Closes-Bug: #1842677
This commit is contained in:
parent
5075a76366
commit
67d41db5fa
@ -1935,7 +1935,13 @@ 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…
x
Reference in New Issue
Block a user