diff options
Diffstat (limited to 'os_client_config/config.py')
-rw-r--r-- | os_client_config/config.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/os_client_config/config.py b/os_client_config/config.py index 4c054bf..ce4f045 100644 --- a/os_client_config/config.py +++ b/os_client_config/config.py @@ -69,6 +69,8 @@ VENDOR_FILES = [ BOOL_KEYS = ('insecure', 'cache') +FORMAT_EXCLUSIONS = frozenset(['password']) + # NOTE(dtroyer): This turns out to be not the best idea so let's move # overriding defaults to a kwarg to OpenStackConfig.__init__() @@ -1089,7 +1091,7 @@ class OpenStackConfig(object): # If any of the defaults reference other values, we need to expand for (key, value) in config.items(): - if hasattr(value, 'format'): + if hasattr(value, 'format') and key not in FORMAT_EXCLUSIONS: config[key] = value.format(**config) force_ipv4 = config.pop('force_ipv4', self.force_ipv4) @@ -1184,7 +1186,7 @@ class OpenStackConfig(object): # If any of the defaults reference other values, we need to expand for (key, value) in config.items(): - if hasattr(value, 'format'): + if hasattr(value, 'format') and key not in FORMAT_EXCLUSIONS: config[key] = value.format(**config) force_ipv4 = config.pop('force_ipv4', self.force_ipv4) |