web/request.py
branchstable
changeset 6078 c08e74b0609e
parent 6064 2a164fabcbfc
child 6079 bd7e3042791e
--- a/web/request.py	Fri Aug 06 17:38:45 2010 +0200
+++ b/web/request.py	Mon Aug 09 11:56:12 2010 +0200
@@ -27,6 +27,7 @@
 from datetime import date
 from urlparse import urlsplit
 from itertools import count
+from warnings import warn
 
 from rql.utils import rqlvar_maker
 
@@ -383,7 +384,6 @@
             try:
                 ret = func(req, *args)
             except TypeError:
-                from warnings import warn
                 warn('[3.2] user callback should now take request as argument')
                 ret = func(*args)
             self.unregister_callback(self.pageid, cbname)
@@ -447,7 +447,7 @@
                 name, peid = param.split(':', 1)
             except ValueError:
                 if not param.startswith('__') and param != "eid":
-                    self.warning('param %s mis-formatted', param)
+                    warn('param %s mis-formatted', param)
                 continue
             if peid == eid:
                 value = form[param]