X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fsol005%2Fuser.py;h=15848783092409609838f5c1dff624eb2a12837b;hb=ada5e9195ebaf0c67b3f6777299fe4d1e0dbeb76;hp=660c944821beaab7feb9de3cd0dafc479a3b00f0;hpb=1dcfc22c87e588df01723d3c3c407450ddda5405;p=osm%2Fosmclient.git diff --git a/osmclient/sol005/user.py b/osmclient/sol005/user.py index 660c944..1584878 100644 --- a/osmclient/sol005/user.py +++ b/osmclient/sol005/user.py @@ -214,9 +214,11 @@ class User(object): self._client.get_token() # keystone with external LDAP contains large ids, not uuid format # utils.validate_uuid4(name) cannot be used - for user in self.list(): + user_list = self.list() + for user in user_list: if name == user['_id']: return user + for user in user_list: if name == user['username']: return user raise NotFound("User {} not found".format(name))