diff options
Diffstat (limited to 'sos/report/plugins/openstack_swift.py')
-rw-r--r-- | sos/report/plugins/openstack_swift.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sos/report/plugins/openstack_swift.py b/sos/report/plugins/openstack_swift.py index f1da8763..9f3e2efb 100644 --- a/sos/report/plugins/openstack_swift.py +++ b/sos/report/plugins/openstack_swift.py @@ -63,12 +63,14 @@ class OpenStackSwift(Plugin): connection_keys = ["connection", "sql_connection"] self.apply_regex_sub( - r"(^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys), + fr"(^\s*({'|'.join(protect_keys)})\s*=\s*)(.*)", r"\1*********" ) + + join_con_keys = '|'.join(connection_keys) + self.apply_regex_sub( - r"(^\s*(%s)\s*=\s*(.*)://(\w*):)(.*)(@(.*))" % - "|".join(connection_keys), + fr"(^\s*({join_con_keys})\s*=\s*(.*)://(\w*):)(.*)(@(.*))", r"\1*********\6" ) |