summaryrefslogtreecommitdiff
path: root/flup/publisher.py
diff options
context:
space:
mode:
Diffstat (limited to 'flup/publisher.py')
-rw-r--r--flup/publisher.py29
1 files changed, 15 insertions, 14 deletions
diff --git a/flup/publisher.py b/flup/publisher.py
index 73a8b30..a0c6676 100644
--- a/flup/publisher.py
+++ b/flup/publisher.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2002, 2005 Allan Saddi <allan@saddi.com>
+# Copyright (c) 2002, 2005, 2006 Allan Saddi <allan@saddi.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -85,19 +85,20 @@ class Request(object):
environ=self._environ, keep_blank_values=1)
# Collapse FieldStorage into a simple dict.
- for field in form.list:
- # Wrap uploaded files
- if field.filename:
- val = File(field)
- else:
- val = field.value
-
- # Add File/value to args, constructing a list if there are
- # multiple values.
- if self._form.has_key(field.name):
- self._form[field.name].append(val)
- else:
- self._form[field.name] = [val]
+ if form.list is not None:
+ for field in form.list:
+ # Wrap uploaded files
+ if field.filename:
+ val = File(field)
+ else:
+ val = field.value
+
+ # Add File/value to args, constructing a list if there are
+ # multiple values.
+ if self._form.has_key(field.name):
+ self._form[field.name].append(val)
+ else:
+ self._form[field.name] = [val]
# Unwrap lists with a single item.
for name,val in self._form.items():