Make super() compatible for Python2

This commit is contained in:
Grey Li 2018-05-16 19:13:19 +08:00 committed by GitHub
parent 03036533f0
commit 07b9ff6e77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,7 +124,7 @@ handler. ::
def format(self, record):
record.url = request.url
record.remote_addr = request.remote_addr
return super().format(record)
return super(RequestFormatter, self).format(record)
formatter = RequestFormatter(
'[%(asctime)s] %(remote_addr)s requested %(url)s\n'