From d689cc8edca54f2474fe07d8af785cadf77a8dd9 Mon Sep 17 00:00:00 2001 From: Pierguido Lambri Date: Fri, 22 Jun 2018 15:51:33 +0100 Subject: [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 --- sos/plugins/unpackaged.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: -- cgit