From 27aa22ff917cc20f9cc9a9e1e6a1b1a4a46042da Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Thu, 21 Mar 2019 10:29:47 +0100 Subject: [networking] import os.listdir method Resolves: #1608 Signed-off-by: Pavel Moravec --- sos/plugins/networking.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sos/plugins/networking.py b/sos/plugins/networking.py index 07a7285d..015fb19e 100644 --- a/sos/plugins/networking.py +++ b/sos/plugins/networking.py @@ -7,6 +7,7 @@ # See the LICENSE file in the source distribution for further information. from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin +from os import listdir import re @@ -156,7 +157,7 @@ class Networking(Plugin): # Get ethtool output for every device that does not exist in a # namespace. - for eth in os.listdir("/sys/class/net/"): + for eth in listdir("/sys/class/net/"): # skip 'bonding_masters' file created when loading the bonding # module but the file does not correspond to a device if eth == "bonding_masters": -- cgit