Baby steps (2 to 3 at a time)

This commit is contained in:
Miroslav Stampar
2019-01-22 00:40:48 +01:00
parent 17b79cd21b
commit 7672b9a0a2
36 changed files with 139 additions and 139 deletions

View File

@@ -79,7 +79,7 @@ class Dump(object):
try:
self._outputFP.write(text)
except IOError, ex:
except IOError as ex:
errMsg = "error occurred while writing to log file ('%s')" % getSafeExString(ex)
raise SqlmapGenericException(errMsg)
@@ -99,7 +99,7 @@ class Dump(object):
self._outputFile = os.path.join(conf.outputPath, "log")
try:
self._outputFP = openFile(self._outputFile, "ab" if not conf.flushSession else "wb")
except IOError, ex:
except IOError as ex:
errMsg = "error occurred while opening log file ('%s')" % getSafeExString(ex)
raise SqlmapGenericException(errMsg)
@@ -426,7 +426,7 @@ class Dump(object):
if not os.path.isdir(dumpDbPath):
try:
os.makedirs(dumpDbPath)
except Exception, ex:
except Exception as ex:
try:
tempDir = tempfile.mkdtemp(prefix="sqlmapdb")
except IOError, _: