From 51fa0e3a53b6da46cf66dee20850b0eac31cf05f Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Fri, 5 Feb 2016 18:31:59 +0000 Subject: [networking] check for nmcli warning messages The nmcli command may print warning messages if the version of the tool does not match the running daemon: filter these warnings out of the list of connections or devices to check. Fixes: #710. Signed-off-by: Bryn M. Reeves --- sos/plugins/networking.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sos/plugins/networking.py b/sos/plugins/networking.py index 1004aa2f..646eb226 100644 --- a/sos/plugins/networking.py +++ b/sos/plugins/networking.py @@ -212,6 +212,8 @@ class Networking(Plugin): "nmcli --terse --fields NAME con") if nmcli_con_show_result['status'] == 0: for con in nmcli_con_show_result['output'].splitlines(): + if con[0:7] == 'Warning': + continue self.add_cmd_output("%s '%s'" % (nmcli_con_details_cmd, con)) @@ -219,6 +221,8 @@ class Networking(Plugin): "nmcli --terse --fields DEVICE dev") if nmcli_dev_status_result['status'] == 0: for dev in nmcli_dev_status_result['output'].splitlines(): + if dev[0:7] == 'Warning': + continue self.add_cmd_output("%s '%s'" % (nmcli_dev_details_cmd, dev)) -- cgit