Comparisons to singletons like None should always be done with is or is not, never the equality operators.

This commit is contained in:
deix
2017-08-28 17:51:27 +02:00
parent d9330ef698
commit 00e5246f96
12 changed files with 31 additions and 31 deletions

View File

@@ -26,14 +26,14 @@ class Aircrack(object):
def is_running(self):
return self.pid.poll() == None
return self.pid.poll() is None
def is_cracked(self):
return os.path.exists(self.cracked_file)
def stop(self):
''' Stops aircrack process '''
if self.pid.poll() == None:
if self.pid.poll() is None:
self.pid.interrupt()
def get_key_hex_ascii(self):
@@ -56,7 +56,7 @@ class Aircrack(object):
# Hex key is non-printable in ascii
ascii_key = None
continue
elif ascii_key == None:
elif ascii_key is None:
# We can't generate an Ascii key
continue
# Convert decimal to char