From a2047d3f9fb36d67d4897d1bf976b5a7eb3f610f Mon Sep 17 00:00:00 2001 From: Tang Chen Date: Fri, 27 Nov 2015 16:52:56 +0800 Subject: [PATCH] Trivial: Fix typo in find() in network. Change-Id: Ic54fbb9160adefe3d025d537125e125128f75ee6 --- openstackclient/network/common.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openstackclient/network/common.py b/openstackclient/network/common.py index bd6203bd03..31faef25f3 100644 --- a/openstackclient/network/common.py +++ b/openstackclient/network/common.py @@ -27,7 +27,8 @@ def find(client, resource, resources, name_or_id, name_attr='name'): n = find(netclient, 'network', 'networks', 'matrix') """ list_method = getattr(client, "list_%s" % resources) - # Search for by name + + # Search by name kwargs = {name_attr: name_or_id, 'fields': 'id'} data = list_method(**kwargs) info = data[resources] @@ -36,7 +37,8 @@ def find(client, resource, resources, name_or_id, name_attr='name'): if len(info) > 1: msg = "More than one %s exists with the name '%s'." raise exceptions.CommandError(msg % (resource, name_or_id)) - # Search for by id + + # Search by id data = list_method(id=name_or_id, fields='id') info = data[resources] if len(info) == 1: