changeset 5569:327e180af6d9

add RenderAsDocbook to actions_excluded if we have no python-xml
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 22 Feb 2010 10:22:19 +0100
parents 0ca159b745e8
children 395781ee66d7 5835fd165996
files MoinMoin/config/multiconfig.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/config/multiconfig.py	Sun Feb 21 17:41:28 2010 +0100
+++ b/MoinMoin/config/multiconfig.py	Mon Feb 22 10:22:19 2010 +0100
@@ -299,7 +299,13 @@
             except ImportError:
                 self.chart_options = None
 
-        # post process
+        # "Render As Docbook" requires python-xml.
+        if 'RenderAsDocbook' not in self.actions_excluded:
+            try:
+                from xml.dom.ext.reader import Sax
+            except ImportError:
+                # this will also remove it from the actions menu:
+                self.actions_excluded.append('RenderAsDocbook')
 
         # 'setuid' special auth method auth method can log out
         self.auth_can_logout = ['setuid']