Switching to the getSafeExString (where it can be used)

This commit is contained in:
Miroslav Stampar
2015-09-10 15:51:33 +02:00
parent 7a261ef447
commit f494004f44
15 changed files with 66 additions and 39 deletions

View File

@@ -1523,7 +1523,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 " % ex.message
errMsg += "system's temporary directory location(s) ('%s'). Please " % getSafeExString(ex)
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"
@@ -2071,7 +2071,7 @@ def _mergeOptions(inputOptions, overrideOptions):
inputOptions = base64unpickle(inputOptions.pickledOptions)
except Exception, ex:
errMsg = "provided invalid value '%s' for option '--pickled-options'" % inputOptions.pickledOptions
errMsg += " ('%s')" % ex.message if ex.message else ""
errMsg += " ('%s')" % ex if ex.message else ""
raise SqlmapSyntaxException(errMsg)
if inputOptions.configFile: