Commit b3903158 authored by Guido van Rossum's avatar Guido van Rossum

Must catch TypeError from int(length).

parent f66cccf5
......@@ -234,7 +234,7 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
self.log_message("command: %s", cmdline)
try:
nbytes = int(length)
except ValueError:
except (TypeError, ValueError):
nbytes = 0
files = popenx(cmdline, 'b')
fi = files[0]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment