From: jlgijsbers Date: Sun, 15 Feb 2004 10:08:20 +0000 (+0000) Subject: Call actions in a different way so we won't hide any bad TypeErrors. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a3fca8d39de7f687ed7e92859f2a384e2b156f12;p=roundup.git 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 --- 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))