diff options
author | Ian Davis <ian.davis@grassrootsbio.com> | 2012-05-10 10:01:47 -0400 |
---|---|---|
committer | Ian Davis <ian.davis@grassrootsbio.com> | 2012-05-10 10:01:47 -0400 |
commit | 1a2a72cea0400e7095f6a40f0aa8fe83af995c75 (patch) | |
tree | 472936fa27eda9939f771b6f6a75a7565cb60c55 | |
parent | 461c5a714c46d5378f0073fc2740dc8fb6884e2b (diff) | |
download | bottle-1a2a72cea0400e7095f6a40f0aa8fe83af995c75.tar.gz |
BUGFIX: avoid cryptic TypeError when pickling FormsDict objects.
-rw-r--r-- | bottle.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) |