Skip to content

Commit 9b578e5

Browse files
caberoscaberos
authored andcommitted
fix the tox tool
1 parent 46417bc commit 9b578e5

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

SoftLayer/utils.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -272,16 +272,12 @@ def resolve_ids(identifier, resolvers):
272272
"""
273273

274274
# 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
275+
if type(identifier) == int:
276+
return [int(identifier)]
277+
# It was worth a shot
284278

279+
elif len(identifier) == 36 and UUID_RE.match(identifier):
280+
return [identifier]
285281
for resolver in resolvers:
286282
ids = resolver(identifier)
287283
if ids:

0 commit comments

Comments
 (0)