tighten up except - int() only raises ValueError

This commit is contained in:
Skip Montanaro 2002-03-23 05:47:31 +00:00
parent 6ec967d066
commit 3c643d8db3
1 changed files with 1 additions and 1 deletions

View File

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