We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46417bc commit 9b578e5Copy full SHA for 9b578e5
SoftLayer/utils.py
@@ -272,16 +272,12 @@ def resolve_ids(identifier, resolvers):
272
"""
273
274
# Before doing anything, let's see if this is an integer
275
- try:
276
- id = [int(identifier)]
277
- # This looks like a globalIdentifier (UUID)
278
- if len(id) == 36 and UUID_RE.match(id):
279
- return [identifier]
280
- else:
281
- return id
282
- except ValueError:
283
- pass # It was worth a shot
+ if type(identifier) == int:
+ return [int(identifier)]
+ # It was worth a shot
284
+ elif len(identifier) == 36 and UUID_RE.match(identifier):
+ return [identifier]
285
for resolver in resolvers:
286
ids = resolver(identifier)
287
if ids:
0 commit comments