Skip to content

Commit b7415d3

Browse files
committed
Minor refactoring
1 parent 7a8ace7 commit b7415d3

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

_sqlmap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ def main():
107107
kb.threadContinue = False
108108
kb.threadException = True
109109

110-
if conf.get("hashDB", None):
110+
if conf.get("hashDB"):
111111
try:
112112
conf.hashDB.flush(True)
113113
except KeyboardInterrupt:
114114
pass
115115

116116
# Reference: http://stackoverflow.com/questions/1635080/terminate-a-multi-thread-python-program
117-
if conf.get("threads", 0) > 1 or conf.get("dnsServer", None):
117+
if conf.get("threads", 0) > 1 or conf.get("dnsServer"):
118118
os._exit(0)

lib/core/threads.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def runThreads(numThreads, threadFunction, cleanupFunction=None, forwardExceptio
195195
if lock.locked_lock():
196196
lock.release()
197197

198-
if conf.get("hashDB", None):
198+
if conf.get("hashDB"):
199199
conf.hashDB.flush(True)
200200

201201
if cleanupFunction:

lib/utils/hashdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def retrieve(self, key, unserialize=False):
5757
retVal = None
5858
if key and (self._write_cache or os.path.isfile(self.filepath)):
5959
hash_ = HashDB.hashKey(key)
60-
retVal = self._write_cache.get(hash_, None)
60+
retVal = self._write_cache.get(hash_)
6161
if not retVal:
6262
while True:
6363
try:

0 commit comments

Comments
 (0)