Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
parentdir=os.path.abspath(os.path.join(cwd,".."))
self.flowLog("testing pyflow cwd: '%s' parentdir: '%s'" % (cwd,parentdir))
# task will fail unless pwd == parentdir:
#
# test both absolute and relative cwd arguments:
#
self.addTask("testAbsCwd","[ $(pwd) == '%s' ]; exit $?" % (parentdir),cwd=parentdir)
self.addTask("testRelCwd","[ $(pwd) == '%s' ]; exit $?" % (parentdir),cwd="..")
# Instantiate the workflow
#
wflow = CwdWorkflow()
# Run the worklow:
#
retval=wflow.run(mode="local")
sys.exit(retval)