Skip to content

Commit 0ce52db

Browse files
author
Johannes Gijsbers
committed
Add backwards compatible action handling.
1 parent a5017d0 commit 0ce52db

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

roundup/cgi/client.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.158 2004-02-14 01:17:38 jlgijsbers Exp $
1+
# $Id: client.py,v 1.159 2004-02-14 11:27:23 jlgijsbers Exp $
22

33
"""WWW request handler (also used in the stand-alone server).
44
"""
@@ -553,7 +553,12 @@ def handle_action(self):
553553
else:
554554
raise ValueError, 'No such action "%s"'%action
555555
# call the mapped action
556-
action_klass(self).handle()
556+
try:
557+
action_klass(self).handle()
558+
except TypeError:
559+
# Old way of specifying actions.
560+
getattr(self, action_klass)()
561+
557562
except ValueError, err:
558563
self.error_message.append(str(err))
559564

0 commit comments

Comments
 (0)