Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit db5d144

Browse files
author
Skip Montanaro
committed
tighten up except - only ValueError can be raised in this situation
1 parent 3c643d8 commit db5d144

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/cgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ def __init__(self, fp=None, headers=None, outerboundary="",
506506
if self.headers.has_key('content-length'):
507507
try:
508508
clen = int(self.headers['content-length'])
509-
except:
509+
except ValueError:
510510
pass
511511
if maxlen and clen > maxlen:
512512
raise ValueError, 'Maximum content length exceeded'

0 commit comments

Comments
 (0)