From 6db35f66a321942690224e8fd11d1fac176e5c89 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Fri, 30 Jan 2015 22:14:34 +0200 Subject: [PATCH] Make mesg_class a class attribute. --- gunicorn/http/parser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gunicorn/http/parser.py b/gunicorn/http/parser.py index 9dbf7ab3..a4a0f1e4 100644 --- a/gunicorn/http/parser.py +++ b/gunicorn/http/parser.py @@ -9,8 +9,9 @@ from gunicorn.http.unreader import SocketUnreader, IterUnreader class Parser(object): - def __init__(self, mesg_class, cfg, source): - self.mesg_class = mesg_class + mesg_class = None + + def __init__(self, cfg, source): self.cfg = cfg if hasattr(source, "recv"): self.unreader = SocketUnreader(source) @@ -47,5 +48,4 @@ class Parser(object): class RequestParser(Parser): - def __init__(self, *args, **kwargs): - super(RequestParser, self).__init__(Request, *args, **kwargs) + mesg_class = Request