diff MoinMoin/wikimacro.py @ 53:699811601bed

merge moin--main--1.3--patch-934,935: detect correctly missing plguins and missing names in plugins Patches applied: * arch@arch.thinkmo.de--2003-archives/moin--main--1.3--patch-934 detect correctly missing plguins and missing names in plugins * arch@arch.thinkmo.de--2003-archives/moin--main--1.3--patch-935 updated CHANGES * nirs@freeshell.org--2005/moin--fix--1.3--patch-60 detect correctly missing plguins and missing names in plugins imported from: moin--main--1.5--patch-54
author Nir Soffer <nirs@freeshell.org>
date Thu, 29 Sep 2005 00:50:30 +0000
parents 54d5932d5a03
children e51cb51522d1
line wrap: on
line diff
--- a/MoinMoin/wikimacro.py	Thu Sep 29 00:39:21 2005 +0000
+++ b/MoinMoin/wikimacro.py	Thu Sep 29 00:50:30 2005 +0000
@@ -108,7 +108,7 @@
         self.name = macro_name
         try:
             execute = wikiutil.importPlugin(self.cfg, 'macro', macro_name)
-        except ImportError:
+        except wikiutil.PluginMissingError:
             try:
                 builtins = self.__class__
                 execute = getattr(builtins, '_macro_' + macro_name)
@@ -116,7 +116,7 @@
                 if macro_name in i18n.languages:
                     execute = builtins._m_lang
                 else:
-                    raise ImportError("Cannot load macro %s" % macro_name)        
+                    raise ImportError("Cannot load macro %s" % macro_name)
         return execute(self, args)
 
     def _m_lang(self, text):
@@ -140,7 +140,7 @@
         try:
             return wikiutil.importPlugin(self.request.cfg, 'macro',
                                          macro_name, 'Dependencies')
-        except (ImportError, AttributeError):
+        except wikiutil.PluginError:
             return self.defaultDependency
 
     def _macro_TitleSearch(self, args):