Calling FailRender in PostJobScript

Is calling FailRender the proper way to cause an Error from a PostJob Script?

If so, what namespace does it need called with OR what needs imported?

I am getting the following Error when trying to call it in a PostJob script:

[code]from System.IO import *
from Deadline.Scripting import *
from Deadline.Plugins import *

def main():
myProcess = ProcessUtils.SpawnProcess(“C:\Python26\python.exe”, “x:\registerRender.py”)
myProcess.WaitForExit()
exitCode = myProcess.ExitCode

if(exitCode == 0):
	LogInfo("registerRender.py - SUCCESS")
else:
	LogInfo("registerRender.py - FAILED (Exit Code %d)" % exitCode)
	FailRender("registerRender.py - FAILED (Exit Code %d)" % exitCode)[/code]

Thanks,
Paul
Whiskytree

Hey Paul,

FailRender isn’t available for pre and post job scripts, but you should be able to raise a python exception to fail the render:

raise Exception( "registerRender.py - FAILED (Exit Code %d)" % exitCode )

Hope that helps!

  • Ryan