summaryrefslogtreecommitdiffstats
path: root/Lib/wsgiref
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-03-19 07:04:59 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-03-19 07:04:59 (GMT)
commit1cd4ff6284071140826c8cfbb4771e4e395b774a (patch)
tree7bed1b761c2fc333f00af76cec1e7463c312c330 /Lib/wsgiref
parentadcb6545194abdbefa47e5377367041634f1577c (diff)
downloadcpython-1cd4ff6284071140826c8cfbb4771e4e395b774a.zip
cpython-1cd4ff6284071140826c8cfbb4771e4e395b774a.tar.gz
cpython-1cd4ff6284071140826c8cfbb4771e4e395b774a.tar.bz2
Issue #26560: Avoid potential ValueError in BaseHandler.start_response
Initial patch by Peter Inglesby.
Diffstat (limited to 'Lib/wsgiref')
-rw-r--r--Lib/wsgiref/handlers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/wsgiref/handlers.py b/Lib/wsgiref/handlers.py
index 63d5993..acb3547 100644
--- a/Lib/wsgiref/handlers.py
+++ b/Lib/wsgiref/handlers.py
@@ -226,7 +226,7 @@ class BaseHandler:
self.headers = self.headers_class(headers)
status = self._convert_string_type(status, "Status")
assert len(status)>=4,"Status must be at least 4 characters"
- assert int(status[:3]),"Status message must begin w/3-digit code"
+ assert status[:3].isdigit(), "Status message must begin w/3-digit code"
assert status[3]==" ", "Status message must have a space after code"
if __debug__: