From: Guido van Rossum Date: Thu, 17 Oct 2002 16:21:35 +0000 (+0000) Subject: Must catch TypeError from int(length). X-Git-Tag: v2.3c1~3752 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b39031587246c0c2dfc21271c1bbfb37dbfc748f;p=thirdparty%2FPython%2Fcpython.git Must catch TypeError from int(length). --- diff --git a/Lib/CGIHTTPServer.py b/Lib/CGIHTTPServer.py index 6c3e09ea9bef..b3f922bbd35d 100644 --- a/Lib/CGIHTTPServer.py +++ b/Lib/CGIHTTPServer.py @@ -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]