nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James McMahon <>
Subject Handling an error and sys.exit from python in ExecuteScript
Date Wed, 16 May 2018 15:03:04 GMT
Hello. I am using an ExecuteScript processor to run a python script in the
NiFi jython environment. Early in my script I try to get user and group
info from my ldap server. It works, but I want to properly handle the case
where the ldap server is down. If it is down and I get an ldap error in the
following try/except, how should I feed that back to and handle that in the
ExecuteScript processor? Since I've not yet read in any flow files at this
point, do I even need to do anything other than simply allow the script to
fail which should throw a yellow warning from the processor and block
flowfile processing?

My try/except:
     # code to access uid and gid info from ldap....
except ldap.LDAPError, e:
     print e

Thanks for any help.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message