mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 11:33:47 +03:00
Minor adjustment
This commit is contained in:
parent
050015d2bb
commit
319adef8c4
|
@ -1114,11 +1114,10 @@ def profile(profileOutputFile=None, imageOutputFile=None):
|
|||
|
||||
graphScriptPath = os.path.join(paths.SQLMAP_EXTRAS_PATH, 'gprof2dot', 'gprof2dot.py')
|
||||
process = execute('%s %s -f pstats %s | dot -Tpng -o %s' % (sys.executable, graphScriptPath, profileOutputFile, imageOutputFile), shell=True, stdout=None, stderr=PIPE)
|
||||
pollProcess(process)
|
||||
payloadStderr = process.communicate()[1]
|
||||
processStderr = process.communicate()[1]
|
||||
|
||||
if payloadStderr or not os.path.exists(imageOutputFile):
|
||||
errMsg = "there was an error while converting ('%s'), " % payloadStderr.strip()
|
||||
if processStderr or not os.path.exists(imageOutputFile):
|
||||
errMsg = "there was an error while converting ('%s'), " % processStderr.strip()
|
||||
errMsg += "but you can still find raw profile data "
|
||||
errMsg += "inside file '%s'" % profileOutputFile
|
||||
logger.error(errMsg)
|
||||
|
|
Loading…
Reference in New Issue
Block a user