From a3fca8d39de7f687ed7e92859f2a384e2b156f12 Mon Sep 17 00:00:00 2001 From: jlgijsbers Date: Sun, 15 Feb 2004 10:08:20 +0000 Subject: [PATCH] Call actions in a different way so we won't hide any bad TypeErrors. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2087 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/cgi/client.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py index 62452c7..e095de1 100644 --- a/roundup/cgi/client.py +++ b/roundup/cgi/client.py @@ -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)) -- 2.30.2