mirror of
https://github.com/nmap/nmap.git
synced 2025-12-10 09:49:05 +00:00
Replace == and != with is and is not for comparisons with None
This commit is contained in:
@@ -142,7 +142,7 @@ class NetworkInventory(object):
|
||||
# A dictionary mapping IP addresses into HostInfo objects
|
||||
self.hosts = {}
|
||||
|
||||
if filename != None:
|
||||
if filename is not None:
|
||||
self.open_from_file(filename)
|
||||
|
||||
def add_scan(self, scan, filename=None):
|
||||
@@ -177,7 +177,7 @@ class NetworkInventory(object):
|
||||
|
||||
self.scans.append(scan)
|
||||
|
||||
if filename != None:
|
||||
if filename is not None:
|
||||
basename = os.path.basename(filename)
|
||||
|
||||
if basename in self.filenames.values():
|
||||
|
||||
Reference in New Issue
Block a user