aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Hope-Morley <edward.hope-morley@canonical.com>2017-03-02 15:16:01 +0000
committerBryn M. Reeves <bmr@redhat.com>2017-03-14 17:27:26 +0000
commit368db9a60640055a44a1ab655d17423966617e3c (patch)
tree7cffc80b2932d30b37950429c447f2959f99e5ad
parent4927abab8c6cc646678963f0c6bb7ca850b061ee (diff)
downloadsos-368db9a60640055a44a1ab655d17423966617e3c.tar.gz
[networking] Support iproute2 ns list output
iproute2 now prints an id after namespace names when listing with e.g. ip netns. This breaks the sosreport get_ip_netns() function. Fixes #948 Signed-off-by: Edward Hope-Morley <edward.hope-morley@canonical.com> Closes #949. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/networking.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/plugins/networking.py b/sos/plugins/networking.py
index 595f29c4..48014d0c 100644
--- a/sos/plugins/networking.py
+++ b/sos/plugins/networking.py
@@ -76,7 +76,7 @@ class Networking(Plugin):
or line.isspace() \
or line[:1].isspace():
return out
- out.append(line)
+ out.append(line.partition(' ')[0])
return out
def get_netns_devs(self, namespace):