fix flake8
This commit is contained in:
parent
24bdb1ce98
commit
9c4b0f7b15
|
@ -1,7 +1,4 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import syslog
|
|
||||||
import platform
|
|
||||||
import types
|
import types
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
async_loop = asyncio
|
async_loop = asyncio
|
||||||
|
|
||||||
from sanic.log import logger, access_logger, error_logger
|
from sanic.log import logger, access_logger
|
||||||
from sanic.response import HTTPResponse
|
from sanic.response import HTTPResponse
|
||||||
from sanic.request import Request
|
from sanic.request import Request
|
||||||
from sanic.exceptions import (
|
from sanic.exceptions import (
|
||||||
|
@ -424,9 +424,9 @@ def serve(host, port, request_handler, error_handler, before_start=None,
|
||||||
request_timeout=60, ssl=None, sock=None, request_max_size=None,
|
request_timeout=60, ssl=None, sock=None, request_max_size=None,
|
||||||
reuse_port=False, loop=None, protocol=HttpProtocol, backlog=100,
|
reuse_port=False, loop=None, protocol=HttpProtocol, backlog=100,
|
||||||
register_sys_signals=True, run_async=False, connections=None,
|
register_sys_signals=True, run_async=False, connections=None,
|
||||||
signal=Signal(), request_class=None, access_log=True, keep_alive=True,
|
signal=Signal(), request_class=None, access_log=True,
|
||||||
is_request_stream=False, router=None, websocket_max_size=None,
|
keep_alive=True, is_request_stream=False, router=None,
|
||||||
websocket_max_queue=None, state=None,
|
websocket_max_size=None, websocket_max_queue=None, state=None,
|
||||||
graceful_shutdown_timeout=15.0):
|
graceful_shutdown_timeout=15.0):
|
||||||
"""Start asynchronous HTTP Server on an individual process.
|
"""Start asynchronous HTTP Server on an individual process.
|
||||||
|
|
||||||
|
@ -519,7 +519,8 @@ def serve(host, port, request_handler, error_handler, before_start=None,
|
||||||
try:
|
try:
|
||||||
loop.add_signal_handler(_signal, loop.stop)
|
loop.add_signal_handler(_signal, loop.stop)
|
||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
logger.warn('Sanic tried to use loop.add_signal_handler but it is'
|
logger.warn(
|
||||||
|
'Sanic tried to use loop.add_signal_handler but it is'
|
||||||
' not implemented on this platform.')
|
' not implemented on this platform.')
|
||||||
pid = os.getpid()
|
pid = os.getpid()
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user