changeset 2563:389e427e5bfb

fix slight bug with TOC macro vs. built-in macros
author Johannes Berg <johannes AT sipsolutions DOT net>
date Wed, 25 Jul 2007 13:48:45 +0200
parents b76d66ed0251
children 92a7f41c3cad
files MoinMoin/macro/TableOfContents.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/macro/TableOfContents.py	Wed Jul 25 13:42:30 2007 +0200
+++ b/MoinMoin/macro/TableOfContents.py	Wed Jul 25 13:48:45 2007 +0200
@@ -9,7 +9,7 @@
 import re
 from MoinMoin.formatter import FormatterBase
 from MoinMoin.Page import Page
-from MoinMoin.wikiutil import PluginAttributeError, importPlugin
+from MoinMoin import wikiutil
 
 
 Dependencies = ['page']
@@ -36,11 +36,11 @@
         try:
             # plugins that are defined in the macro class itself
             # can't generate headings this way, but that's fine
-            gen_headings = importPlugin(self.request.cfg, 'macro',
-                                        name, 'generates_headings')
+            gen_headings = wikiutil.importPlugin(self.request.cfg, 'macro',
+                                                 name, 'generates_headings')
             if gen_headings:
                 return FormatterBase.macro(self, macro_obj, name, args)
-        except PluginAttributeError:
+        except (wikiutil.PluginMissingError, wikiutil.PluginAttributeError):
             pass
         return ''