aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2018-06-11 22:13:47 +0200
committerBryn M. Reeves <bmr@redhat.com>2018-06-18 15:57:47 +0100
commitf8f2d2bbf87ae434b3b353dbe2f376e8bcc640a7 (patch)
treeae7f2f392da730172b7bff212a81958b550ab840
parent190158304a0b46598357150c88fff906f893cc0c (diff)
downloadsos-f8f2d2bbf87ae434b3b353dbe2f376e8bcc640a7.tar.gz
[fibrechannel] test if dir exists before listing it
Resolves: #1341 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r--sos/plugins/fibrechannel.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sos/plugins/fibrechannel.py b/sos/plugins/fibrechannel.py
index 72ec968c..570c385e 100644
--- a/sos/plugins/fibrechannel.py
+++ b/sos/plugins/fibrechannel.py
@@ -29,7 +29,8 @@ class Fibrechannel(Plugin, RedHatPlugin):
]
for loc in dirs:
- devs.extend([loc + device for device in os.listdir(loc)])
+ devs.extend([loc + device for device in os.listdir(loc)
+ if os.path.isdir(loc)])
if devs:
self.add_udev_info(devs, attrs=True)