mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-26 05:14:57 +08:00
Add coding style check, reformat.
This commit is contained in:
@@ -27,7 +27,8 @@ class RequestHandler(tornado.web.RequestHandler):
|
||||
|
||||
@property
|
||||
def json(self):
|
||||
if not self.request.headers.get("Content-Type").startswith("application/json"):
|
||||
if not self.request.headers.get(
|
||||
"Content-Type").startswith("application/json"):
|
||||
return None
|
||||
return json.loads(self.request.body)
|
||||
|
||||
@@ -67,8 +68,10 @@ class FiltHelp(RequestHandler):
|
||||
commands=filt.help
|
||||
))
|
||||
|
||||
|
||||
class WebSocketEventBroadcaster(tornado.websocket.WebSocketHandler):
|
||||
connections = None # raise an error if inherited class doesn't specify its own instance.
|
||||
# raise an error if inherited class doesn't specify its own instance.
|
||||
connections = None
|
||||
|
||||
def open(self):
|
||||
self.connections.add(self)
|
||||
@@ -264,4 +267,4 @@ class Application(tornado.web.Application):
|
||||
cookie_secret=os.urandom(256),
|
||||
debug=debug,
|
||||
)
|
||||
super(Application, self).__init__(handlers, **settings)
|
||||
super(Application, self).__init__(handlers, **settings)
|
||||
|
||||
Reference in New Issue
Block a user