mirror of
https://github.com/django/daphne.git
synced 2025-07-27 07:29:46 +03:00
PEP8
This commit is contained in:
parent
d4396d36df
commit
a4591347df
|
@ -71,4 +71,4 @@ class AccessLogGenerator(object):
|
|||
|
||||
def close_stream(self):
|
||||
self.stream.flush()
|
||||
self.stream.close()
|
||||
self.stream.close()
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import argparse
|
||||
import functools
|
||||
import logging
|
||||
import sys
|
||||
import signal
|
||||
|
||||
import sys
|
||||
from argparse import ArgumentError, Namespace
|
||||
|
||||
from asgiref.compatibility import is_double_callable
|
||||
|
@ -188,14 +187,12 @@ class CommandLineInterface(object):
|
|||
|
||||
self.server = None
|
||||
|
||||
|
||||
# For logrotate at SIGNALUSR1
|
||||
def logrotate(self, signum, stack):
|
||||
if self.access_log is not None:
|
||||
access_log_stream = open(self.access_log, "a", 1)
|
||||
self.server.rotate_log_action(AccessLogGenerator(access_log_stream))
|
||||
|
||||
|
||||
@classmethod
|
||||
def entrypoint(cls):
|
||||
"""
|
||||
|
|
|
@ -329,4 +329,4 @@ class Server(object):
|
|||
|
||||
def rotate_log_action(self, log):
|
||||
self.action_logger.close_stream()
|
||||
self.action_logger = log
|
||||
self.action_logger = log
|
||||
|
|
Loading…
Reference in New Issue
Block a user