aboutsummaryrefslogtreecommitdiff
path: root/cgi/framework.py
diff options
context:
space:
mode:
Diffstat (limited to 'cgi/framework.py')
-rw-r--r--cgi/framework.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/cgi/framework.py b/cgi/framework.py
index e827f67..053bef0 100644
--- a/cgi/framework.py
+++ b/cgi/framework.py
@@ -235,17 +235,19 @@ def getFormData(self):
self.environ["wsgi.post_form"] = post_form
self.environ["wsgi.input"] = new_input
- formdata = {}
- for key in dict(fs):
- try:
- formdata.update({key: fs[key].value})
- if key == "file":
- formdata.update({"file_original": secure_filename(fs[key].filename)})
- except AttributeError:
- formdata.update({key: fs[key]})
-
- return formdata
-
+ try:
+ formdata = {}
+ for key in dict(fs):
+ try:
+ formdata.update({key: fs[key].value})
+ if key == "file":
+ formdata.update({"file_original": secure_filename(fs[key].filename)})
+ except AttributeError:
+ formdata.update({key: fs[key]})
+
+ return formdata
+ except TypeError:
+ return fs
class InputProcessed(object):
def read(self):
raise EOFError("El stream de wsgi.input ya se ha consumido.")