Merge pull request #1663 from BuhtigithuB/improve/pep8-http-py

Enhance http.py PEP8
This commit is contained in:
mdipierro
2017-07-10 14:14:09 -05:00
committed by GitHub

View File

@@ -116,7 +116,7 @@ class HTTP(Exception):
for k, v in iteritems(headers):
if isinstance(v, list):
rheaders += [(k, str(item)) for item in v]
elif not v is None:
elif v is not None:
rheaders.append((k, str(v)))
responder(status, rheaders)
if env.get('request_method', '') == 'HEAD':
@@ -148,7 +148,7 @@ class HTTP(Exception):
web2py_error=self.headers.get('web2py_error'))
def __str__(self):
"stringify me"
"""stringify me"""
return self.message