changeset 4139:e3893c082fe5

Oops, some fixes. Was already wondering why i got no output.
author Florian Krupicka <florian.krupicka@googlemail.com>
date Thu, 29 May 2008 17:16:33 +0200
parents 6bbc4beed793
children 5f4831ba630e
files MoinMoin/action/__init__.py MoinMoin/request/__init__.py
diffstat 2 files changed, 5 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/__init__.py	Thu May 29 14:59:41 2008 +0200
+++ b/MoinMoin/action/__init__.py	Thu May 29 17:16:33 2008 +0200
@@ -313,9 +313,9 @@
         actions = names[:]
         actions.extend(wikiutil.getPlugins('action', config))
         actions = set(action for action in actions
-                      if not action in self.config.actions_excluded)
+                      if not action in config.actions_excluded)
         config.cache.action_names = actions # remember it
-    return cfg.cache.action_names
+    return config.cache.action_names
 
 def getHandler(request, action, identifier="execute"):
     """ return a handler function for a given action or None.
--- a/MoinMoin/request/__init__.py	Thu May 29 14:59:41 2008 +0200
+++ b/MoinMoin/request/__init__.py	Thu May 29 17:16:33 2008 +0200
@@ -771,7 +771,7 @@
     def getAvailableActions(self, page):
         """ DEPRECATED! use MoinMoin.action.get_available_actions instead
         """
-        if getattr(self, '_available_actions') is None:
+        if getattr(self, '_available_actions', None) is None:
             self._available_actions = get_available_actions(self.cfg, page, self.user)
             
         # Return a copy, so clients will not change the dict.
@@ -1121,6 +1121,7 @@
         self.loadTheme(theme_name)
 
     def _try_redirect_spaces_page(self, pagename):
+        logging.info('redirect %s', pagename)
         if '_' in pagename and not self.page.exists():
             pname = pagename.replace('_', ' ')
             pg = Page(self, pname)
@@ -1217,7 +1218,7 @@
 
                 msg = None
                 # Complain about unknown actions
-                if not action_name in get_names():
+                if not action_name in get_names(self.cfg):
                     msg = _("Unknown action %(action_name)s.") % {
                             'action_name': wikiutil.escape(action_name), }
 
@@ -1257,12 +1258,6 @@
             pass
         except SystemExit:
             raise # fcgi uses this to terminate a thread
-        except Exception, err:
-            try:
-                # nothing we can do about further failures!
-                self.fail(err)
-            except:
-                pass
 
         if self.cfg.log_timing:
             self.timing_log(False, action_name)