aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2017-09-04 16:03:56 +0100
committerBryn M. Reeves <bmr@redhat.com>2017-09-04 16:05:34 +0100
commit32a4be0a005d16b6d9b7101bda008bdc0129d8e7 (patch)
treeed7a56778878869a050702ef89335b59ee59fc96
parent99518754ed8cc509915ed444b015dd9f98d3b583 (diff)
downloadsos-32a4be0a005d16b6d9b7101bda008bdc0129d8e7.tar.gz
[block] remove bogus '.' and '..' checks
The Python listdir() function never returns the special '.' and '..' directory entries. Do not test for them. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/block.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/plugins/block.py b/sos/plugins/block.py
index 95ed57a8..864956b1 100644
--- a/sos/plugins/block.py
+++ b/sos/plugins/block.py
@@ -43,7 +43,7 @@ class Block(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
if os.path.isdir("/sys/block"):
for disk in os.listdir("/sys/block"):
- if disk in [".", ".."] or disk.startswith("ram"):
+ if disk.startswith("ram"):
continue
disk_path = os.path.join('/dev/', disk)
self.add_cmd_output([