diff options
Diffstat (limited to 'openstackclient/common')
| -rw-r--r-- | openstackclient/common/clientmanager.py | 4 | ||||
| -rw-r--r-- | openstackclient/common/utils.py | 14 |
2 files changed, 14 insertions, 4 deletions
diff --git a/openstackclient/common/clientmanager.py b/openstackclient/common/clientmanager.py index 48b3aca5..78a0ae6e 100644 --- a/openstackclient/common/clientmanager.py +++ b/openstackclient/common/clientmanager.py @@ -183,8 +183,8 @@ class ClientManager(object): elif 'tenant_name' in self._auth_params: self._project_name = self._auth_params['tenant_name'] - LOG.info('Using auth plugin: %s' % self.auth_plugin_name) - LOG.debug('Using parameters %s' % + LOG.info('Using auth plugin: %s', self.auth_plugin_name) + LOG.debug('Using parameters %s', strutils.mask_password(self._auth_params)) self.auth = auth_plugin.load_from_options(**self._auth_params) # needed by SAML authentication diff --git a/openstackclient/common/utils.py b/openstackclient/common/utils.py index 4142f830..840da402 100644 --- a/openstackclient/common/utils.py +++ b/openstackclient/common/utils.py @@ -163,7 +163,7 @@ def get_field(item, field): raise exceptions.CommandError(msg) -def get_item_properties(item, fields, mixed_case_fields=[], formatters={}): +def get_item_properties(item, fields, mixed_case_fields=None, formatters=None): """Return a tuple containing the item properties. :param item: a single item resource (e.g. Server, Project, etc) @@ -172,6 +172,11 @@ def get_item_properties(item, fields, mixed_case_fields=[], formatters={}): :param formatters: dictionary mapping field names to callables to format the values """ + if mixed_case_fields is None: + mixed_case_fields = [] + if formatters is None: + formatters = {} + row = [] for field in fields: @@ -187,7 +192,7 @@ def get_item_properties(item, fields, mixed_case_fields=[], formatters={}): return tuple(row) -def get_dict_properties(item, fields, mixed_case_fields=[], formatters={}): +def get_dict_properties(item, fields, mixed_case_fields=None, formatters=None): """Return a tuple containing the item properties. :param item: a single dict resource @@ -196,6 +201,11 @@ def get_dict_properties(item, fields, mixed_case_fields=[], formatters={}): :param formatters: dictionary mapping field names to callables to format the values """ + if mixed_case_fields is None: + mixed_case_fields = [] + if formatters is None: + formatters = {} + row = [] for field in fields: |
