Skip to content

Commit a2047d3

Browse files
committed
Trivial: Fix typo in find() in network.
Change-Id: Ic54fbb9160adefe3d025d537125e125128f75ee6
1 parent c48afe6 commit a2047d3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎openstackclient/network/common.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ def find(client, resource, resources, name_or_id, name_attr='name'):
2727
n = find(netclient, 'network', 'networks', 'matrix')
2828
"""
2929
list_method = getattr(client, "list_%s" % resources)
30-
# Search for by name
30+
31+
# Search by name
3132
kwargs = {name_attr: name_or_id, 'fields': 'id'}
3233
data = list_method(**kwargs)
3334
info = data[resources]
@@ -36,7 +37,8 @@ def find(client, resource, resources, name_or_id, name_attr='name'):
3637
if len(info) > 1:
3738
msg = "More than one %s exists with the name '%s'."
3839
raise exceptions.CommandError(msg % (resource, name_or_id))
39-
# Search for by id
40+
41+
# Search by id
4042
data = list_method(id=name_or_id, fields='id')
4143
info = data[resources]
4244
if len(info) == 1:

0 commit comments

Comments
 (0)