diff options
| author | Mike Korobov <kmike84@gmail.com> | 2010-04-18 23:47:21 +0600 |
|---|---|---|
| committer | Mike Korobov <kmike84@gmail.com> | 2010-04-18 23:47:21 +0600 |
| commit | 76530537bf47220748229f1da7f8eed68c1906a5 (patch) | |
| tree | b0d9e4c38d0769222a6641ad7ac305a1c5865091 /webtest | |
| parent | 55d82af08d2f26189caf3103d18543dac30e9292 (diff) | |
| download | webtest-76530537bf47220748229f1da7f8eed68c1906a5.tar.gz | |
Python 2.5 compatibility
Diffstat (limited to 'webtest')
| -rw-r--r-- | webtest/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/webtest/__init__.py b/webtest/__init__.py index 3253ca9..1d69a3f 100644 --- a/webtest/__init__.py +++ b/webtest/__init__.py @@ -1221,7 +1221,10 @@ def _parse_attrs(text): attr_name = match.group(1).lower() attr_body = match.group(2) or match.group(3) attr_body = html_unquote(attr_body or '') - attrs[attr_name] = attr_body + # python <= 2.5 doesn't like **dict when the keys are unicode + # so cast str on them. Unicode field attributes are not + # supported now (actually they have never been supported). + attrs[str(attr_name)] = attr_body return attrs class Field(object): |
