]> git.ipfire.org Git - pakfire.git/commitdiff
Catch all exceptions when running scripts.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 7 Dec 2011 15:53:11 +0000 (16:53 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 8 Dec 2011 15:59:40 +0000 (16:59 +0100)
That should never break the whole transaction because
we may get an inconsistent system.

python/pakfire/actions.py

index e8bb69638e229c29ee596c4bedc9ee31a8549e50..37d446f392d82373b58a6b05d2e3b36e17e0ae20 100644 (file)
@@ -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: