Hi
Related to this earlier question https://knowledge.safe.com/questions/4957/python-startup-script-to-terminate-workspace.html I want to cleanly terminate the creation of a Private Scripted Python Parameter. Throwing an exception pollutes the log with the script from the exception and confuses the user (and author sometimes!)
Then discovered the sys.exit() function and this gives me a better result:
import sys
val = FME_MacroValues['INPUT_TEST']
if val == 'Fail':
print 'You chose {} \nProgram Terminating\nTranslation FAILED.'.format(val)
sys.exit(0)
else:
return 'all ok'
Could do with a sanity check from resident Python Jedi that have any comments or any detrimental issues for use with FME?
*Note only tested on FME Desktop NOT Server!