1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 13:11:28 +00:00

Replace == and != with is and is not for comparisons with None

This commit is contained in:
dmiller
2014-01-09 16:47:20 +00:00
parent 96141b431e
commit 51b143353b
18 changed files with 61 additions and 64 deletions

View File

@@ -211,7 +211,7 @@ class XMLNode:
c_result = child.query_children(name, attr, value, first, deep)
if c_result != None:
if c_result is not None:
if first:
return c_result
@@ -245,7 +245,7 @@ class XMLNode:
c_result = child.search_children(name, first, deep)
if c_result != None and c_result != []:
if c_result is not None and c_result != []:
if first:
return c_result
@@ -329,7 +329,7 @@ class XMLReader(xml.sax.ContentHandler):
def parse(self):
"""
"""
if self.__file != None:
if self.__file is not None:
self.__parser.parse(self.__file)
def startDocument(self):
@@ -351,7 +351,7 @@ class XMLReader(xml.sax.ContentHandler):
if len(self.__status) > 0:
self.__status[-1].add_child(node)
if self.__root == None:
if self.__root is None:
self.__root = node
self.__status.append(node)