Test for object identity

This commit is contained in:
deix
2017-08-29 18:19:50 +02:00
parent 3fe4e1fd25
commit 48f7417177
3 changed files with 3 additions and 3 deletions

View File

@@ -36,7 +36,7 @@ class WEPAttackType(object):
self.value = value
return
raise Exception("Attack number %d not found" % var)
elif type(var) == str:
elif type(var) is str:
for (name,value) in WEPAttackType.__dict__.iteritems():
if type(value) is int:
if name == var: