Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ec5c08c

Browse files
committed
cosmetics
1 parent 3fd1c37 commit ec5c08c

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

lib/core/target.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,11 @@ def __createTargetDirs():
235235
if not os.path.isdir(paths.SQLMAP_OUTPUT_PATH):
236236
try:
237237
os.makedirs(paths.SQLMAP_OUTPUT_PATH, 0755)
238-
except OSError:
238+
except OSError, msg:
239239
tempDir = tempfile.mkdtemp(prefix='output')
240-
warnMsg = "unable to create default root output directory at "
241-
warnMsg += "'%s'. using temporary directory '%s' instead" % (paths.SQLMAP_OUTPUT_PATH, tempDir)
240+
warnMsg = "unable to create default root output directory "
241+
warnMsg += "'%s' (%s). " % (paths.SQLMAP_OUTPUT_PATH, msg)
242+
warnMsg += "using temporary directory '%s' instead" % tempDir
242243
logger.warn(warnMsg)
243244

244245
paths.SQLMAP_OUTPUT_PATH = tempDir
@@ -248,9 +249,10 @@ def __createTargetDirs():
248249
if not os.path.isdir(conf.outputPath):
249250
try:
250251
os.makedirs(conf.outputPath, 0755)
251-
except OSError:
252+
except OSError, msg:
252253
tempDir = tempfile.mkdtemp(prefix='output')
253-
warnMsg = "unable to create output directory '%s'. " % conf.outputPath
254+
warnMsg = "unable to create output directory "
255+
warnMsg += "'%s' (%s). " % (conf.outputPath, msg)
254256
warnMsg += "using temporary directory '%s' instead" % tempDir
255257
logger.warn(warnMsg)
256258

0 commit comments

Comments
 (0)