web/views/basecontrollers.py
changeset 2144 51c84d585456
parent 2058 7ef12c03447c
parent 2079 aff0950c54c4
child 2293 7ded2a1416e4
--- a/web/views/basecontrollers.py	Tue Jun 23 13:31:35 2009 +0200
+++ b/web/views/basecontrollers.py	Tue Jun 23 13:36:38 2009 +0200
@@ -239,9 +239,11 @@
         response content type
         """
         self.req.pageid = self.req.form.get('pageid')
-        fname = self.req.form['fname']
         try:
+            fname = self.req.form['fname']
             func = getattr(self, 'js_%s' % fname)
+        except KeyError:
+            raise RemoteCallFailed('no method specified')
         except AttributeError:
             raise RemoteCallFailed('no %s method' % fname)
         # no <arg> attribute means the callback takes no argument