Must catch TypeError from int(length).

This commit is contained in:
Guido van Rossum 2002-10-17 16:21:35 +00:00
parent f66cccf506
commit b390315872
1 changed files with 1 additions and 1 deletions

View File

@ -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]