diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2017-09-04 16:03:56 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2017-09-04 16:05:34 +0100 |
commit | 32a4be0a005d16b6d9b7101bda008bdc0129d8e7 (patch) | |
tree | ed7a56778878869a050702ef89335b59ee59fc96 | |
parent | 99518754ed8cc509915ed444b015dd9f98d3b583 (diff) | |
download | sos-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.py | 2 |
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([ |