From 7f77157765cb29b0767c215b9fd7d5332252155c Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Mon, 11 Jun 2018 22:18:59 +0200 Subject: [infiniband] test if dir exists before listing it Resolves: #1342 Signed-off-by: Pavel Moravec --- sos/plugins/infiniband.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sos/plugins/infiniband.py b/sos/plugins/infiniband.py index d85194b4..5b2864d8 100644 --- a/sos/plugins/infiniband.py +++ b/sos/plugins/infiniband.py @@ -45,7 +45,7 @@ class Infiniband(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): "perfquery" ] IB_SYS_DIR = "/sys/class/infiniband/" - ibs = os.listdir(IB_SYS_DIR) + ibs = os.listdir(IB_SYS_DIR) if os.path.isdir(IB_SYS_DIR) else [] for ib in ibs: """ Skip OPA hardware, as infiniband-diags tools does not understand -- cgit