From: Skip Montanaro Date: Sat, 23 Mar 2002 05:47:31 +0000 (+0000) Subject: tighten up except - int() only raises ValueError X-Git-Tag: v2.3c1~6382 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c643d8db3dbf58b9a75462d15359573964c57c7;p=python tighten up except - int() only raises ValueError --- diff --git a/Lib/CGIHTTPServer.py b/Lib/CGIHTTPServer.py index 7a7e0754f4..7bb7467798 100644 --- a/Lib/CGIHTTPServer.py +++ b/Lib/CGIHTTPServer.py @@ -235,7 +235,7 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): self.log_message("command: %s", cmdline) try: nbytes = int(length) - except: + except ValueError: nbytes = 0 files = popenx(cmdline, 'b') fi = files[0]