Mercurial > p > roundup > code
changeset 2015:95f2c726f664
Add backwards compatible action handling.
| author | Johannes Gijsbers <jlgijsbers@users.sourceforge.net> |
|---|---|
| date | Sat, 14 Feb 2004 11:27:23 +0000 |
| parents | 366d3bbce982 |
| children | 2112962f5bb1 |
| files | roundup/cgi/client.py |
| diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/cgi/client.py Sat Feb 14 02:06:27 2004 +0000 +++ b/roundup/cgi/client.py Sat Feb 14 11:27:23 2004 +0000 @@ -1,4 +1,4 @@ -# $Id: client.py,v 1.158 2004-02-14 01:17:38 jlgijsbers Exp $ +# $Id: client.py,v 1.159 2004-02-14 11:27:23 jlgijsbers Exp $ """WWW request handler (also used in the stand-alone server). """ @@ -553,7 +553,12 @@ else: raise ValueError, 'No such action "%s"'%action # call the mapped action - action_klass(self).handle() + try: + action_klass(self).handle() + except TypeError: + # Old way of specifying actions. + getattr(self, action_klass)() + except ValueError, err: self.error_message.append(str(err))
