From: Michael Tremer Date: Wed, 7 Dec 2011 15:53:11 +0000 (+0100) Subject: Catch all exceptions when running scripts. X-Git-Tag: 0.9.19~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1361a82b9cda70998bdf296ef3c8cb916ca9d5e2;p=pakfire.git Catch all exceptions when running scripts. That should never break the whole transaction because we may get an inconsistent system. --- diff --git a/python/pakfire/actions.py b/python/pakfire/actions.py index e8bb69638..37d446f39 100644 --- a/python/pakfire/actions.py +++ b/python/pakfire/actions.py @@ -196,6 +196,9 @@ class ActionScript(Action): raise ActionError, _("The scriptlet ran more than %s seconds and was killed." \ % SCRIPTLET_TIMEOUT) + except Exception, e: + raise ActionError, _("The scriptlet returned with an unhandled error:\n%s" % e) + finally: # Remove the script file. try: