From 076f0515cab9d17da7e004e58c1e2443cf17de63 Mon Sep 17 00:00:00 2001 From: Yun Xu Date: Sat, 25 Nov 2017 21:14:18 -0800 Subject: [PATCH] Fix flake8 --- sanic/server.py | 4 +++- sanic/worker.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sanic/server.py b/sanic/server.py index 0efcfd05..d50842b9 100644 --- a/sanic/server.py +++ b/sanic/server.py @@ -635,7 +635,9 @@ def serve(host, port, request_handler, error_handler, before_start=None, coros = [] for conn in connections: if hasattr(conn, "websocket") and conn.websocket: - coros.append(conn.websocket.close_connection(after_handshake=True)) + coros.append( + conn.websocket.close_connection(after_handshake=True) + ) else: conn.close() diff --git a/sanic/worker.py b/sanic/worker.py index 6de18159..3d8a4617 100644 --- a/sanic/worker.py +++ b/sanic/worker.py @@ -115,7 +115,9 @@ class GunicornWorker(base.Worker): coros = [] for conn in self.connections: if hasattr(conn, "websocket") and conn.websocket: - coros.append(conn.websocket.close_connection(after_handshake=False)) + coros.append( + conn.websocket.close_connection(after_handshake=False) + ) else: conn.close() _shutdown = asyncio.gather(*coros, loop=self.loop)