From 1361a82b9cda70998bdf296ef3c8cb916ca9d5e2 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 7 Dec 2011 16:53:11 +0100 Subject: [PATCH] Catch all exceptions when running scripts. That should never break the whole transaction because we may get an inconsistent system. --- python/pakfire/actions.py | 3 +++ 1 file changed, 3 insertions(+) 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: -- 2.39.5