Code

Call actions in a different way so we won't hide any bad TypeErrors.
authorjlgijsbers <jlgijsbers@57a73879-2fb5-44c3-a270-3262357dd7e2>
Sun, 15 Feb 2004 10:08:20 +0000 (10:08 +0000)
committerjlgijsbers <jlgijsbers@57a73879-2fb5-44c3-a270-3262357dd7e2>
Sun, 15 Feb 2004 10:08:20 +0000 (10:08 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2087 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/cgi/client.py

index 62452c7fc4726f7f682efffd07163fed0f146119..e095de1ea213e46ea8890de67480c331ab5e18a0 100644 (file)
@@ -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 @@ class Client:
                     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))