Dolda2000 GitWeb
/
wrw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3350ac8
)
Always handle I/O errors in util.formparams.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 8 Nov 2015 02:52:53 +0000
(
03:52
+0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 8 Nov 2015 02:52:53 +0000
(
03:52
+0100)
wrw/util.py
patch
|
blob
|
blame
|
history
diff --git
a/wrw/util.py
b/wrw/util.py
index
460344f
..
a1dcc6c
100644
(file)
--- a/
wrw/util.py
+++ b/
wrw/util.py
@@
-10,7
+10,10
@@
def wsgiwrap(callable):
def formparams(callable):
spec = inspect.getargspec(callable)
def wrapper(req):
- data = form.formdata(req)
+ try:
+ data = form.formdata(req)
+ except IOError:
+ raise resp.httperror(400, "Invalid request", "Form data was incomplete")
args = dict(data.items())
args["req"] = req
if not spec.keywords: