]> granicus.if.org Git - python/commitdiff
Must catch TypeError from int(length).
authorGuido van Rossum <guido@python.org>
Thu, 17 Oct 2002 16:21:35 +0000 (16:21 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 17 Oct 2002 16:21:35 +0000 (16:21 +0000)
Lib/CGIHTTPServer.py

index 6c3e09ea9bef3801f6da2bd409563c2215635b89..b3f922bbd35d641aa21584c3f55a970f04c0e335 100644 (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]