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

Skip to content

Commit b390315

Browse files
committed
Must catch TypeError from int(length).
1 parent f66cccf commit b390315

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/CGIHTTPServer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def run_cgi(self):
234234
self.log_message("command: %s", cmdline)
235235
try:
236236
nbytes = int(length)
237-
except ValueError:
237+
except (TypeError, ValueError):
238238
nbytes = 0
239239
files = popenx(cmdline, 'b')
240240
fi = files[0]

0 commit comments

Comments
 (0)