]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
fixed the bug that tornado.stack_context.wrap restricts kwargs for function 549/head
authorAndrej A Antonov <polymorphm@gmail.com>
Wed, 27 Jun 2012 01:18:54 +0000 (05:18 +0400)
committerAndrej A Antonov <polymorphm@gmail.com>
Wed, 27 Jun 2012 01:18:54 +0000 (05:18 +0400)
tornado/stack_context.py

index 1843762953857c3d64dc9ee4ddf71c9734dafe3c..afce681ba061d81cbb6967277f04d216e5b90a75 100644 (file)
@@ -195,7 +195,9 @@ def wrap(fn):
     # functools.wraps doesn't appear to work on functools.partial objects
     #@functools.wraps(fn)
 
-    def wrapped(callback, contexts, *args, **kwargs):
+    def wrapped(*args, **kwargs):
+        callback, contexts, args = args[0], args[1], args[2:]
+        
         if contexts is _state.contexts or not contexts:
             callback(*args, **kwargs)
             return