tighten up except - int() only raises ValueError
This commit is contained in:
parent
6ec967d066
commit
3c643d8db3
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue