Kristian Petersen via FreeIPA-users wrote:
I am working on a script that as part of its function modifies some
user
attributes. However, this gets run a few times at the beginning of a
semester since people add and drop classes sometimes before the deadline
prevents that. Because of this situation, some people have no
modification to be made when the API call goes out and FreeIPA throws
the EmptyModlist exception. For some reason I can't catch it with
anything but catch all exception. I need to catch it and just have the
script proceed like nothing really happened if no modification is made.
Hard to say without seeing the code or what you've already tried but I
don't see why this wouldn't work:
from ipalib import errors
try:
some call
except errors.EmptyModlist as e:
pass
rob