Browse Source

Merge "Log a warning when reset fails" into stable/stein

tags/11.5.1
Zuul 2 weeks ago
parent
commit
8e4592f0df
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      tripleoclient/utils.py

+ 7
- 1
tripleoclient/utils.py View File

@@ -2042,5 +2042,11 @@ def reset_cmdline():
2042 2042
     # only try to reset if stdout is a terminal, skip if not (e.g. CI)
2043 2043
     if not sys.stdout.isatty():
2044 2044
         return
2045
-    sys.stdout.write(run_command(['reset', '-I']))
2045
+    output = ''
2046
+    try:
2047
+        output = run_command(['reset', '-I'])
2048
+    except RuntimeError as e:
2049
+        LOG.warning('Unable to reset command line. Try manually running '
2050
+                    '"reset" if the command line is broken.')
2051
+    sys.stdout.write(output)
2046 2052
     sys.stdout.flush()

Loading…
Cancel
Save