]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Construct ErrorHandler with kwargs instead of positional arguments
authorBen Darnell <ben@bendarnell.com>
Tue, 14 Dec 2010 20:22:17 +0000 (12:22 -0800)
committerBen Darnell <ben@bendarnell.com>
Tue, 14 Dec 2010 20:22:17 +0000 (12:22 -0800)
for consistency with normal handler construction (and compatibility with
the initialize() changes from a couple of commits ago).

Closes #194.

tornado/web.py

index aab8dc19da9392ef525e95da8ce71974fcb741ae..70bd01136128a292d6e2c4970b62301052ede55d 100644 (file)
@@ -1160,7 +1160,7 @@ class Application(object):
                         args = [unquote(s) for s in match.groups()]
                     break
             if not handler:
-                handler = ErrorHandler(self, request, 404)
+                handler = ErrorHandler(self, request, status_code=404)
 
         # In debug mode, re-compile templates and reload static files on every
         # request so you don't need to restart to see changes