diff options
-rw-r--r-- | sos/cleaner/__init__.py | 5 | ||||
-rw-r--r-- | sos/cleaner/obfuscation_archive.py | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sos/cleaner/__init__.py b/sos/cleaner/__init__.py index 88d4d0ea..8280bc50 100644 --- a/sos/cleaner/__init__.py +++ b/sos/cleaner/__init__.py @@ -226,8 +226,7 @@ third party. nested_archives = [] for _file in archive.getmembers(): if (re.match('sosreport-.*.tar', _file.name.split('/')[-1]) and not - (_file.name.endswith('.md5') or - _file.name.endswith('.sha256'))): + (_file.name.endswith(('.md5', '.sha256')))): nested_archives.append(_file.name.split('/')[-1]) if nested_archives: @@ -235,6 +234,8 @@ third party. nested_path = self.extract_archive(archive) for arc_file in os.listdir(nested_path): if re.match('sosreport.*.tar.*', arc_file): + if arc_file.endswith(('.md5', '.sha256')): + continue self.report_paths.append(os.path.join(nested_path, arc_file)) # add the toplevel extracted archive diff --git a/sos/cleaner/obfuscation_archive.py b/sos/cleaner/obfuscation_archive.py index 90188358..e357450b 100644 --- a/sos/cleaner/obfuscation_archive.py +++ b/sos/cleaner/obfuscation_archive.py @@ -58,6 +58,7 @@ class SoSObfuscationArchive(): Returns: list of files and file regexes """ return [ + 'sosreport-', 'sys/firmware', 'sys/fs', 'sys/kernel/debug', |