diff options
-rw-r--r-- | sos/cleaner/mappings/hostname_map.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sos/cleaner/mappings/hostname_map.py b/sos/cleaner/mappings/hostname_map.py index be68511a..c997ce33 100644 --- a/sos/cleaner/mappings/hostname_map.py +++ b/sos/cleaner/mappings/hostname_map.py @@ -147,7 +147,9 @@ class SoSHostnameMap(SoSMap): if item in self.dataset: return self.dataset[item] if not self.domain_name_in_loaded_domains(item.lower()): - return item + # no match => return the original string with optional + # leading/trailing '.' or '_' characters + return ''.join([prefix, item, suffix]) if item.endswith(self.strip_exts): ext = '.' + item.split('.')[-1] item = item.replace(ext, '') |