From 9ff2b020585b9fcea0cabf06bebc3e21818fbfb8 Mon Sep 17 00:00:00 2001 From: Christopher Dearborn Date: Mon, 19 Feb 2018 09:36:54 -0500 Subject: [PATCH] Fixed indentation in utils.list_settings Fixed the indentation in utils.list_settings. Change-Id: I198bc028537f78228a4899afd788e786c95f0ee6 --- dracclient/utils.py | 54 ++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/dracclient/utils.py b/dracclient/utils.py index dbf4588..a985c51 100644 --- a/dracclient/utils.py +++ b/dracclient/utils.py @@ -252,35 +252,35 @@ def validate_integer_value(value, attr_name, error_msgs): def list_settings(client, namespaces, by_name=True, fqdd_filter=None, name_formatter=None): - """List the configuration settings + """List the configuration settings - :param client: an instance of WSManClient. - :param namespaces: a list of URI/class pairs to retrieve. - :param by_name: controls whether returned dictionary uses - attribute name or instance_id as key. - :param fqdd_filter: An FQDD used to filter the instances. Note that - this is only used when by_name is True. - :param name_formatter: a method used to format the keys in the - returned dictionary. By default, - attribute.name will be used. - :returns: a dictionary with the settings using name or instance_id as - the key. - :raises: WSManRequestFailure on request failures - :raises: WSManInvalidResponse when receiving invalid response - :raises: DRACOperationFailed on error reported back by the DRAC - interface - """ + :param client: an instance of WSManClient. + :param namespaces: a list of URI/class pairs to retrieve. + :param by_name: controls whether returned dictionary uses + attribute name or instance_id as key. + :param fqdd_filter: An FQDD used to filter the instances. Note that + this is only used when by_name is True. + :param name_formatter: a method used to format the keys in the + returned dictionary. By default, + attribute.name will be used. + :returns: a dictionary with the settings using name or instance_id as + the key. + :raises: WSManRequestFailure on request failures + :raises: WSManInvalidResponse when receiving invalid response + :raises: DRACOperationFailed on error reported back by the DRAC + interface + """ - result = {} - for (namespace, attr_cls) in namespaces: - attribs = _get_config(client, namespace, attr_cls, by_name, - fqdd_filter, name_formatter) - if not set(result).isdisjoint(set(attribs)): - raise exceptions.DRACOperationFailed( - drac_messages=('Colliding attributes %r' % ( - set(result) & set(attribs)))) - result.update(attribs) - return result + result = {} + for (namespace, attr_cls) in namespaces: + attribs = _get_config(client, namespace, attr_cls, by_name, + fqdd_filter, name_formatter) + if not set(result).isdisjoint(set(attribs)): + raise exceptions.DRACOperationFailed( + drac_messages=('Colliding attributes %r' % ( + set(result) & set(attribs)))) + result.update(attribs) + return result def _get_config(client, resource, attr_cls, by_name, fqdd_filter,