From b39031587246c0c2dfc21271c1bbfb37dbfc748f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 17 Oct 2002 16:21:35 +0000 Subject: [PATCH] Must catch TypeError from int(length). --- Lib/CGIHTTPServer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/CGIHTTPServer.py b/Lib/CGIHTTPServer.py index 6c3e09ea9be..b3f922bbd35 100644 --- a/Lib/CGIHTTPServer.py +++ b/Lib/CGIHTTPServer.py @@ -234,7 +234,7 @@ def run_cgi(self): self.log_message("command: %s", cmdline) try: nbytes = int(length) - except ValueError: + except (TypeError, ValueError): nbytes = 0 files = popenx(cmdline, 'b') fi = files[0]