Enhance http.py PEP8
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user