@@ -238,23 +238,18 @@ class WSGIHTTPException(Response, HTTPException):
238238 code = 500
239239 title = "Internal Server Error"
240240 explanation = ""
241- body_template_obj = Template (
242- """\
241+ body_template_obj = Template ("""\
243242 ${explanation}<br /><br />
244243${detail}
245244${html_comment}
246- """
247- )
245+ """ )
248246
249- plain_template_obj = Template (
250- """\
247+ plain_template_obj = Template ("""\
251248 ${status}
252249
253- ${body}"""
254- )
250+ ${body}""" )
255251
256- html_template_obj = Template (
257- """\
252+ html_template_obj = Template ("""\
258253 <html>
259254 <head>
260255 <title>${status}</title>
@@ -263,8 +258,7 @@ class WSGIHTTPException(Response, HTTPException):
263258 <h1>${status}</h1>
264259 ${body}
265260 </body>
266- </html>"""
267- )
261+ </html>""" )
268262
269263 # Set this to True for responses that should have no request body
270264 empty_body = False
@@ -543,13 +537,11 @@ class _HTTPMove(HTTPRedirection):
543537 """
544538
545539 explanation = "The resource has been moved to"
546- body_template_obj = Template (
547- """\
540+ body_template_obj = Template ("""\
548541 ${explanation} <a href="${location}">${location}</a>;
549542you should be redirected automatically.
550543${detail}
551- ${html_comment}"""
552- )
544+ ${html_comment}""" )
553545
554546 def __init__ (
555547 self ,
@@ -820,11 +812,9 @@ class HTTPMethodNotAllowed(HTTPClientError):
820812 code = 405
821813 title = "Method Not Allowed"
822814 # override template since we need an environment variable
823- body_template_obj = Template (
824- """\
815+ body_template_obj = Template ("""\
825816 The method ${REQUEST_METHOD} is not allowed for this resource. <br /><br />
826- ${detail}"""
827- )
817+ ${detail}""" )
828818
829819
830820class HTTPNotAcceptable (HTTPClientError ):
@@ -842,12 +832,10 @@ class HTTPNotAcceptable(HTTPClientError):
842832 code = 406
843833 title = "Not Acceptable"
844834 # override template since we need an environment variable
845- body_template_obj = Template (
846- """\
835+ body_template_obj = Template ("""\
847836 The resource could not be generated that was acceptable to your browser
848837(content of type ${HTTP_ACCEPT}. <br /><br />
849- ${detail}"""
850- )
838+ ${detail}""" )
851839
852840
853841class HTTPProxyAuthenticationRequired (HTTPClientError ):
@@ -991,12 +979,10 @@ class HTTPUnsupportedMediaType(HTTPClientError):
991979 code = 415
992980 title = "Unsupported Media Type"
993981 # override template since we need an environment variable
994- body_template_obj = Template (
995- """\
982+ body_template_obj = Template ("""\
996983 The request media type ${CONTENT_TYPE} is not supported by this server.
997984<br /><br />
998- ${detail}"""
999- )
985+ ${detail}""" )
1000986
1001987
1002988class HTTPRequestRangeNotSatisfiable (HTTPClientError ):
@@ -1199,11 +1185,9 @@ class HTTPNotImplemented(HTTPServerError):
11991185
12001186 code = 501
12011187 title = "Not Implemented"
1202- body_template_obj = Template (
1203- """
1188+ body_template_obj = Template ("""
12041189The request method ${REQUEST_METHOD} is not implemented for this server. <br /><br />
1205- ${detail}"""
1206- )
1190+ ${detail}""" )
12071191
12081192
12091193class HTTPBadGateway (HTTPServerError ):
0 commit comments