aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2016-02-05 18:31:59 +0000
committerBryn M. Reeves <bmr@redhat.com>2016-02-05 18:31:59 +0000
commit51fa0e3a53b6da46cf66dee20850b0eac31cf05f (patch)
treeab59a6b18803e27c8e246cd9ec4460423d8f5a8d
parent7f0f6366e33b0b6926508330c70695a6efa0ac3b (diff)
downloadsos-51fa0e3a53b6da46cf66dee20850b0eac31cf05f.tar.gz
[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 <bmr@redhat.com>
-rw-r--r--sos/plugins/networking.py4
1 files changed, 4 insertions, 0 deletions
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))