diff options
author | Ib Lundgren <ib.lundgren@gmail.com> | 2013-01-22 00:16:58 +0100 |
---|---|---|
committer | Ib Lundgren <ib.lundgren@gmail.com> | 2013-01-22 00:16:58 +0100 |
commit | c3a01e19c8ee34fdf1f2aebf367067b7dde0569c (patch) | |
tree | 39e8516eaf0af4185b90716946d9fea71be7d4a9 /oauthlib/common.py | |
parent | b96a71203fa768fbff5074b4f03dbc444df05afd (diff) | |
download | oauthlib-c3a01e19c8ee34fdf1f2aebf367067b7dde0569c.tar.gz |
Large OAuth 2 provider update.
Diffstat (limited to 'oauthlib/common.py')
-rw-r--r-- | oauthlib/common.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/oauthlib/common.py b/oauthlib/common.py index 145f897..d7739a0 100644 --- a/oauthlib/common.py +++ b/oauthlib/common.py @@ -255,10 +255,9 @@ def to_unicode(data, encoding): return (to_unicode(i, encoding) for i in data) else: # We support 2.6 which lacks dict comprehensions - return dict(((to_unicode(k, encoding), to_unicode(v, encoding)) - for k, v in ( - data.items() if isinstance(data, dict) else data - ))) + if isinstance(data, dict): + data = data.items() + return dict(((to_unicode(k, encoding), to_unicode(v, encoding)) for k, v in data)) return data |