Mercurial > moin > 1.9
changeset 2073:afa784d8d58d
Handle PluginErrors while loading event handlers gracefully.
author | Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> |
---|---|
date | Fri, 01 Jun 2007 01:42:38 +0200 |
parents | d347a0303be1 |
children | 088edb461832 |
files | MoinMoin/events/__init__.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/events/__init__.py Fri Jun 01 01:41:27 2007 +0200 +++ b/MoinMoin/events/__init__.py Fri Jun 01 01:42:38 2007 +0200 @@ -11,6 +11,7 @@ from MoinMoin import wikiutil from MoinMoin.util import pysupport +from MoinMoin.wikiutil import PluginAttributeError # A list of available event handlers event_handlers = None @@ -68,7 +69,11 @@ names = wikiutil.getPlugins("events", cfg) for name in names: - handler = wikiutil.importPlugin(cfg, "events", name, "handle") + try: + handler = wikiutil.importPlugin(cfg, "events", name, "handle") + except PluginAttributeError: + handler = None + pass if handler is not None: event_handlers.append(handler)