mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Merge pull request #971 from berkerpeksag/parser-cleanup
Make mesg_class a class attribute.
This commit is contained in:
commit
01327a4e4e
@ -9,8 +9,9 @@ from gunicorn.http.unreader import SocketUnreader, IterUnreader
|
|||||||
|
|
||||||
class Parser(object):
|
class Parser(object):
|
||||||
|
|
||||||
def __init__(self, mesg_class, cfg, source):
|
mesg_class = None
|
||||||
self.mesg_class = mesg_class
|
|
||||||
|
def __init__(self, cfg, source):
|
||||||
self.cfg = cfg
|
self.cfg = cfg
|
||||||
if hasattr(source, "recv"):
|
if hasattr(source, "recv"):
|
||||||
self.unreader = SocketUnreader(source)
|
self.unreader = SocketUnreader(source)
|
||||||
@ -47,5 +48,4 @@ class Parser(object):
|
|||||||
|
|
||||||
class RequestParser(Parser):
|
class RequestParser(Parser):
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
mesg_class = Request
|
||||||
super(RequestParser, self).__init__(Request, *args, **kwargs)
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user