73 stdOutFile=tempfile.TemporaryFile(bufsize=0)
74 stdErrFile=tempfile.TemporaryFile(bufsize=0)
75 cmdHdl=sp.Popen(cmd,shell=
True,stdout=stdOutFile,stderr=stdErrFile)
78 while cmdHdl.returncode ==
None and t<TIME_OUT:
82 if t >= TIME_OUT
and not cmdHdl.returncode:
85 debugMsg(2,
"Execution timed out on Command: '%s'" % cmd)
87 DEBUG
and debugMsg(1,
"Execution timed out on Command: '%s' but it ended while trying to kill it, adjust timer" % cmd)
89 DEBUG
and debugMsg(0,
"End of Execution cicle of Command: '%s' " % cmd)
92 return (stdOutFile,stdErrFile,cmdHdl.returncode)
def debugMsg(level, message)