diff options
author | Pierguido Lambri <plambri@redhat.com> | 2018-06-22 15:51:33 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2018-06-22 18:14:47 +0100 |
commit | d689cc8edca54f2474fe07d8af785cadf77a8dd9 (patch) | |
tree | 2d0d1468ca7648d42165cebbec6bc399e3c73f6b | |
parent | 6b2980091903dacec2cf65d262290a316e0bb7c5 (diff) | |
download | sos-d689cc8edca54f2474fe07d8af785cadf77a8dd9.tar.gz |
[unpackaged] Fixed issue with the exclusion list of directories
In the all_files_system() function there's the possibility to
pass a list of directories to be excluded. This wasn't working properly.
It should now exclude the list of dirs.
Signed-off-by: Pierguido Lambri <plambri@redhat.com>
-rw-r--r-- | sos/plugins/unpackaged.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sos/plugins/unpackaged.py b/sos/plugins/unpackaged.py index bf015dad..ad7d5319 100644 --- a/sos/plugins/unpackaged.py +++ b/sos/plugins/unpackaged.py @@ -42,7 +42,8 @@ class Unpackaged(Plugin, RedHatPlugin): for root, dirs, files in os.walk(path, topdown=True): if exclude: - dirs[:] = [d for d in dirs if dirs not in exclude] + for e in exclude: + dirs[:] = [d for d in dirs if d not in e] for name in files: path = os.path.join(root, name) try: |