remove the UUID check for userids
Change-Id: I548d8ea292f737a6b5b0dddd8271a0cf690392a0 Fixes: bug #1189933
This commit is contained in:

committed by
Adam Young

parent
415e01645d
commit
1bd5b7328b
@@ -1,7 +1,6 @@
|
|||||||
import getpass
|
import getpass
|
||||||
import hashlib
|
import hashlib
|
||||||
import sys
|
import sys
|
||||||
import uuid
|
|
||||||
|
|
||||||
import prettytable
|
import prettytable
|
||||||
|
|
||||||
@@ -78,11 +77,10 @@ def find_resource(manager, name_or_id):
|
|||||||
except exceptions.NotFound:
|
except exceptions.NotFound:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# now try to get entity as uuid
|
# now try the entity as a string
|
||||||
try:
|
try:
|
||||||
uuid.UUID(str(name_or_id))
|
|
||||||
return manager.get(name_or_id)
|
return manager.get(name_or_id)
|
||||||
except (ValueError, exceptions.NotFound):
|
except (exceptions.NotFound):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# finally try to find entity by name
|
# finally try to find entity by name
|
||||||
|
Reference in New Issue
Block a user