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:

View File

@@ -29,7 +29,7 @@ class Airmon(object):
def get(self, index):
''' Gets interface at index (starts at 1) '''
if type(index) == str:
if type(index) is str:
index = int(index)
return self.interfaces[index - 1]

View File

@@ -23,7 +23,7 @@ class Process(object):
Returns tuple:
(stdout, stderr)
'''
if type(command) != str or ' ' in command or shell:
if type(command) is not str or ' ' in command or shell:
shell = True
if Configuration.verbose > 1:
Color.pe("\n {C}[?] {W} Executing (Shell): {B}%s{W}" % command)