Code

Add backwards compatible action handling.
authorjlgijsbers <jlgijsbers@57a73879-2fb5-44c3-a270-3262357dd7e2>
Sat, 14 Feb 2004 11:27:23 +0000 (11:27 +0000)
committerjlgijsbers <jlgijsbers@57a73879-2fb5-44c3-a270-3262357dd7e2>
Sat, 14 Feb 2004 11:27:23 +0000 (11:27 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2083 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/cgi/client.py

index 7722865cb365af31b9568eaa4ec6861bec8713de..45918b3884df0d401622a87c0b61d978ddcbf32e 100644 (file)
@@ -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 @@ class Client:
             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))