Skip to content

Commit 5587c20

Browse files
author
martin.v.loewis
committed
Fake a list property to prevent "Error: not indexable".
committer: Ralf Schlatterbeck <[email protected]>
1 parent 7a5587c commit 5587c20

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

roundup/cgi/client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,10 @@ def __init__(self, instance, request, env, form=None, translator=None):
363363
# see if we need to re-parse the environment for the form (eg Zope)
364364
if form is None:
365365
self.form = cgi.FieldStorage(fp=request.rfile, environ=env)
366+
# In some case (e.g. content-type application/xml), cgi
367+
# will not parse anything. Fake a list property in this case
368+
if self.form.list is None:
369+
self.form.list = []
366370
else:
367371
self.form = form
368372

0 commit comments

Comments
 (0)