diff roundup/cgi/client.py @ 2019:8fab5d394f22

Call actions in a different way so we won't hide any bad TypeErrors.
author Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
date Sun, 15 Feb 2004 10:08:20 +0000
parents 96a1bf48efdd
children 5a7ec0c63095
line wrap: on
line diff
--- a/roundup/cgi/client.py	Sat Feb 14 19:58:20 2004 +0000
+++ b/roundup/cgi/client.py	Sun Feb 15 10:08:20 2004 +0000
@@ -1,4 +1,4 @@
-# $Id: client.py,v 1.160 2004-02-14 19:58:20 jlgijsbers Exp $
+# $Id: client.py,v 1.161 2004-02-15 10:08:20 jlgijsbers Exp $
 
 """WWW request handler (also used in the stand-alone server).
 """
@@ -552,12 +552,13 @@
                     break
             else:
                 raise ValueError, 'No such action "%s"'%action
+
             # call the mapped action
-            try:
-                action_klass(self).execute()
-            except TypeError:
-                # Old way of specifying actions.
+            if isinstance(action_klass, type('')):
+                # old way of specifying actions
                 getattr(self, action_klass)()
+            else:
+                action_klass(self).handle()
                 
         except ValueError, err:
             self.error_message.append(str(err))

Roundup Issue Tracker: http://roundup-tracker.org/