web/request.py
changeset 7990 a673d1d9a738
parent 7894 ad0eeb0f7a8d
child 8032 bcb87336c7d2
--- a/web/request.py	Fri Oct 21 14:32:18 2011 +0200
+++ b/web/request.py	Fri Oct 21 14:32:37 2011 +0200
@@ -405,12 +405,9 @@
         cbname = build_cb_uid(func.__name__)
         def _cb(req):
             try:
-                ret = func(req, *args)
-            except TypeError:
-                warn('[3.2] user callback should now take request as argument')
-                ret = func(*args)
-            self.unregister_callback(self.pageid, cbname)
-            return ret
+                return func(req, *args)
+            finally:
+                self.unregister_callback(self.pageid, cbname)
         self.set_page_data(cbname, _cb)
         return cbname
 
@@ -887,12 +884,6 @@
                 raise
             return default
 
-    @deprecated("[3.4] use parse_accept_header('Accept-Language')")
-    def header_accept_language(self):
-        """returns an ordered list of preferred languages"""
-        return [value.split('-')[0] for value in
-                self.parse_accept_header('Accept-Language')]
-
 
 
 ## HTTP-accept parsers / utilies ##############################################