usertools/telemetry-watcher: fix hang on startup
PATCH 1/1 usertools/telemetry-watcher: fix hang on startup
Commit cbfdffb1083d ("usertools/telemetry: load aliases from config directory") added an extra printed output line to startup of the dpdk-telemetry script when an alias file was loaded. This confuses the wrapper script dpdk-telemetry-watcher, causing it to hang on startup. Only print out the message when script is run interactively.
Fixes cbfdffb1083d ("usertools/telemetry: load aliases from config directory")
Signed-off-by Bruce Richardson <[email protected]>
--- usertools/dpdk-telemetry.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
usertools/dpdk-telemetry.py +3 -1
@@ -98,7 +98,9 @@ def load_aliases(alias_path=None): except OSError as e: print("Warning: failed to read {}: {}".format(alias_path, e), file=sys.stderr) - print("Loaded {} aliases from {}".format(len(aliases), alias_path)) + # only print this informational message in interactive mode + if os.isatty(sys.stdin.fileno()): + print("Loaded {} aliases from {}".format(len(aliases), alias_path)) return aliases
Signature · 1 line
2.53.0
David Marchand
AppliedQuoted 11 lines · Bruce Richardson
Commit
cbfdffb1083d("usertools/telemetry: load aliases from config directory") added an extra printed output line to startup of the dpdk-telemetry script when an alias file was loaded. This confuses the wrapper script dpdk-telemetry-watcher, causing it to hang on startup. Only print out the message when script is run interactively.Fixes cbfdffb1083d ("usertools/telemetry: load aliases from config directory")Signed-off-by Bruce Richardson <[email protected]>
Applied, thanks.
Signature · 1 line
David Marchand