Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
raise
time.sleep(retryDelaySec)
continue
break
if params.cmd is None :
badUsage("Invalid TaskWrapper input: task command set to NONE")
if params.cwd == "" or params.cwd == "None" :
params.cwd = None
toutFp = open(params.outFile, "a")
terrFp = open(params.errFile, "a")
# always keep last N lines of task stderr:
fifo = SimpleFifo(40)
isWin=isWindows()
# Present shell as arg list with Popen(shell=False), so that
# we minimize quoting/escaping issues for 'cmd' itself:
#
fullcmd = []
if (not isWin) and params.isShellCmd :
# TODO shell selection should be configurable somewhere:
shell = ["/bin/bash", "--noprofile", "-o", "pipefail"]
fullcmd = shell + ["-c", params.cmd]
else :
fullcmd = params.cmd
retval = 1