diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-07 09:51:37 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-07 09:51:37 (GMT) |
commit | c0a23e63207984304027f298eefc738b6b3c94b1 (patch) | |
tree | f950a9b7abfb6e0b0d146e6439204df774a83364 /Lib/http/server.py | |
parent | 4a7cc8847276df27c8f52987cda619ca279687c2 (diff) | |
download | cpython-c0a23e63207984304027f298eefc738b6b3c94b1.zip cpython-c0a23e63207984304027f298eefc738b6b3c94b1.tar.gz cpython-c0a23e63207984304027f298eefc738b6b3c94b1.tar.bz2 |
Issue #21793: BaseHTTPRequestHandler again logs response code as numeric,
not as stringified enum. Patch by Demian Brecht.
Diffstat (limited to 'Lib/http/server.py')
-rw-r--r-- | Lib/http/server.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/http/server.py b/Lib/http/server.py index 4704d51..fd13be3 100644 --- a/Lib/http/server.py +++ b/Lib/http/server.py @@ -517,7 +517,8 @@ class BaseHTTPRequestHandler(socketserver.StreamRequestHandler): This is called by send_response(). """ - + if isinstance(code, HTTPStatus): + code = code.value self.log_message('"%s" %s %s', self.requestline, str(code), str(size)) |