summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bottle.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bottle.py b/bottle.py
index 9e7f900..ed15b5b 100644
--- a/bottle.py
+++ b/bottle.py
@@ -1765,6 +1765,9 @@ class FormsDict(MultiDict):
return default
def __getattr__(self, name, default=unicode()):
+ # Without this guard, pickle generates a cryptic TypeError:
+ if name.startswith('__') and name.endswith('__'):
+ return super(FormsDict, self).__getattr__(name)
return self.getunicode(name, default=default)