Do not compare with None using equality operators
@@ -228,7 +228,7 @@ class Benchmark(object):
# get number of threads, default value is 1
self.num_of_threads = int(rootTag.get("threads")) if ("threads" in keys) else 1
- if config.num_of_threads != None:
+ if config.num_of_threads is not None:
self.num_of_threads = config.num_of_threads
if self.num_of_threads < 1:
logging.error("At least ONE thread must be given!")
@@ -323,7 +323,7 @@ class Benchmark(object):
logging.debug("I'm loading some columns for the outputfile.")
columns = []
- if columnsTag != None: # columnsTag is optional in XML file
+ if columnsTag is not None: # columnsTag is optional in XML file
for columnTag in columnsTag.findall("column"):
pattern = columnTag.text
title = columnTag.get("title", pattern)
