From cb9b2d9e9ffff4f3aaeaf803ac684d0bc86a7418 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 4 May 2023 23:11:03 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- daphne/access.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/daphne/access.py b/daphne/access.py index 8fc3dc7..7aa7942 100644 --- a/daphne/access.py +++ b/daphne/access.py @@ -1,5 +1,6 @@ import datetime + class AccessLogGenerator: """ Object that implements the Daphne "action logger" internal interface in @@ -29,10 +30,14 @@ class AccessLogGenerator: request=message, ) - def write_entry(self, host, date, request, status="-", length="-", ident="-", user="-"): + def write_entry( + self, host, date, request, status="-", length="-", ident="-", user="-" + ): """ Writes an NCSA-style entry to the log file (some liberty is taken with what the entries are for non-HTTP) """ formatted_date = date.strftime("%d/%b/%Y:%H:%M:%S") - self.stream.write(f"{host} {ident} {user} [{formatted_date}] \"{request}\" {status} {length}\n") + self.stream.write( + f'{host} {ident} {user} [{formatted_date}] "{request}" {status} {length}\n' + )