Skip to content

Commit 65fb2ba

Browse files
author
Johannes Gijsbers
committed
Call actions in a different way so we won't hide any bad TypeErrors.
1 parent 6e021f8 commit 65fb2ba

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

roundup/cgi/client.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.160 2004-02-14 19:58:20 jlgijsbers Exp $
1+
# $Id: client.py,v 1.161 2004-02-15 10:08:20 jlgijsbers Exp $
22

33
"""WWW request handler (also used in the stand-alone server).
44
"""
@@ -552,12 +552,13 @@ def handle_action(self):
552552
break
553553
else:
554554
raise ValueError, 'No such action "%s"'%action
555+
555556
# call the mapped action
556-
try:
557-
action_klass(self).execute()
558-
except TypeError:
559-
# Old way of specifying actions.
557+
if isinstance(action_klass, type('')):
558+
# old way of specifying actions
560559
getattr(self, action_klass)()
560+
else:
561+
action_klass(self).handle()
561562

562563
except ValueError, err:
563564
self.error_message.append(str(err))

0 commit comments

Comments
 (0)