diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2018-06-11 22:18:59 +0200 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2018-06-18 15:58:35 +0100 |
commit | 7f77157765cb29b0767c215b9fd7d5332252155c (patch) | |
tree | 5563cc3a0b37823ddb4c732e435464a4090cb4bb | |
parent | f8f2d2bbf87ae434b3b353dbe2f376e8bcc640a7 (diff) | |
download | sos-7f77157765cb29b0767c215b9fd7d5332252155c.tar.gz |
[infiniband] test if dir exists before listing it
Resolves: #1342
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r-- | sos/plugins/infiniband.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |