clean codes

This commit is contained in:
lixxu 2017-11-28 14:47:43 +08:00
parent f50a37fc88
commit 283762224c

View File

@ -315,8 +315,7 @@ class HttpProtocol(asyncio.Protocol):
extra['host'] = 'UNKNOWN' extra['host'] = 'UNKNOWN'
if self.request is not None: if self.request is not None:
if self.request.ip: if self.request.ip:
extra['host'] = '{0}:{1}'.format(self.request.ip[0], extra['host'] = '{0[0]}:{0[1]}'.format(self.request.ip)
self.request.ip[1])
extra['request'] = '{0} {1}'.format(self.request.method, extra['request'] = '{0} {1}'.format(self.request.method,
self.request.url) self.request.url)