Skip to content

Commit

Permalink
Construct HTTP 500 page title from response const
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz authored Jan 4, 2019
1 parent 903d5c4 commit f30b8bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aiohttp/web_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,10 @@ def handle_error(self,

ct = 'text/plain'
if status == HTTPStatus.INTERNAL_SERVER_ERROR:
title = '500 Internal Server Error'
title = (

This comment has been minimized.

Copy link
@samuelcolvin

samuelcolvin Jan 4, 2019

Member

Surely using .format would be more readable?

This comment has been minimized.

Copy link
@webknjaz

webknjaz Jan 4, 2019

Author Member

Also true

str(HTTPStatus.INTERNAL_SERVER_ERROR.value) + ' '
+ HTTPStatus.INTERNAL_SERVER_ERROR.phrase
)
msg = HTTPStatus.INTERNAL_SERVER_ERROR.description
tb = None
if self.debug:
Expand Down

0 comments on commit f30b8bb

Please sign in to comment.