summaryrefslogtreecommitdiffstats
path: root/Lib/http
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-03-07 09:51:37 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-03-07 09:51:37 (GMT)
commitc0a23e63207984304027f298eefc738b6b3c94b1 (patch)
treef950a9b7abfb6e0b0d146e6439204df774a83364 /Lib/http
parent4a7cc8847276df27c8f52987cda619ca279687c2 (diff)
downloadcpython-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')
-rw-r--r--Lib/http/server.py3
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))