From 3bc47bc44a24d4a663201fcf335cb749a4562419 Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Thu, 15 Nov 2012 12:52:46 -0500 Subject: [PATCH] Make @asynchronous's added 'handler' argument be keyword instead of positional Adding a positional argument caused a problem when @authenticated_api_view started using @has_request_variables internally. The 'handler' argument used to be passed through positionally to the wrapped function, but when using @has_request_variables, the wrapper inside @authenticated_api_view had to take additional arguments. The handler argument was then assigned to one of those parameters instead of being passed through. (imported from commit 66240bd465c803ddcbf4a603509051fca7381468) --- zephyr/decorator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zephyr/decorator.py b/zephyr/decorator.py index 541ae1c516..cfd40013d8 100644 --- a/zephyr/decorator.py +++ b/zephyr/decorator.py @@ -20,7 +20,7 @@ def asynchronous(method): @wraps(method) def wrapper(request, *args, **kwargs): try: - v = method(request, request._tornado_handler, *args, **kwargs) + v = method(request, handler=request._tornado_handler, *args, **kwargs) if v == None or type(v) == types.GeneratorType: raise TornadoAsyncException except _DefGen_Return, e: