mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-09 06:01:29 +00:00
Better approach for #1320
This commit is contained in:
@@ -876,7 +876,7 @@ def dataToOutFile(filename, data):
|
||||
f.write(data)
|
||||
except IOError, ex:
|
||||
errMsg = "something went wrong while trying to write "
|
||||
errMsg += "to the output file ('%s')" % getUnicode(ex)
|
||||
errMsg += "to the output file ('%s')" % ex.message
|
||||
raise SqlmapGenericException(errMsg)
|
||||
|
||||
return retVal
|
||||
@@ -3662,7 +3662,7 @@ def evaluateCode(code, variables=None):
|
||||
except KeyboardInterrupt:
|
||||
raise
|
||||
except Exception, ex:
|
||||
errMsg = "an error occurred while evaluating provided code ('%s') " % getUnicode(ex)
|
||||
errMsg = "an error occurred while evaluating provided code ('%s') " % ex.message
|
||||
raise SqlmapGenericException(errMsg)
|
||||
|
||||
def serializeObject(object_):
|
||||
|
||||
@@ -74,7 +74,7 @@ class Dump(object):
|
||||
try:
|
||||
self._outputFP.write(text)
|
||||
except IOError, ex:
|
||||
errMsg = "error occurred while writing to log file ('%s')" % getUnicode(ex)
|
||||
errMsg = "error occurred while writing to log file ('%s')" % ex.message
|
||||
raise SqlmapGenericException(errMsg)
|
||||
|
||||
if kb.get("multiThreadMode"):
|
||||
@@ -94,7 +94,7 @@ class Dump(object):
|
||||
try:
|
||||
self._outputFP = openFile(self._outputFile, "ab" if not conf.flushSession else "wb")
|
||||
except IOError, ex:
|
||||
errMsg = "error occurred while opening log file ('%s')" % getUnicode(ex)
|
||||
errMsg = "error occurred while opening log file ('%s')" % ex.message
|
||||
raise SqlmapGenericException(errMsg)
|
||||
|
||||
def getOutputFile(self):
|
||||
|
||||
@@ -1521,7 +1521,7 @@ def _createTemporaryDirectory():
|
||||
os.makedirs(tempfile.gettempdir())
|
||||
except IOError, ex:
|
||||
errMsg = "there has been a problem while accessing "
|
||||
errMsg += "system's temporary directory location(s) ('%s'). Please " % getUnicode(ex)
|
||||
errMsg += "system's temporary directory location(s) ('%s'). Please " % ex.message
|
||||
errMsg += "make sure that there is enough disk space left. If problem persists, "
|
||||
errMsg += "try to set environment variable 'TEMP' to a location "
|
||||
errMsg += "writeable by the current user"
|
||||
|
||||
Reference in New Issue
Block a user