diff options
author | Joel Stevenson <joelstevenson@mac.com> | 2016-04-25 17:24:50 -0700 |
---|---|---|
committer | Joel Stevenson <joelstevenson@mac.com> | 2016-04-25 17:24:50 -0700 |
commit | 69decb87e64d0f6b61283f3c1910bd6672a1da3f (patch) | |
tree | 9967c3edcd09167e7016dfabe4587aeb0937924d | |
parent | 21f39752241c56ca4538d09e225f4653b9446d9e (diff) | |
download | oauthlib-69decb87e64d0f6b61283f3c1910bd6672a1da3f.tar.gz |
Iterate correctly over response_types dict without using six
-rw-r--r-- | oauthlib/oauth2/rfc6749/endpoints/authorization.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/oauthlib/oauth2/rfc6749/endpoints/authorization.py b/oauthlib/oauth2/rfc6749/endpoints/authorization.py index 6389362..af36db9 100644 --- a/oauthlib/oauth2/rfc6749/endpoints/authorization.py +++ b/oauthlib/oauth2/rfc6749/endpoints/authorization.py @@ -7,7 +7,7 @@ This module is an implementation of various logic needed for consuming and providing OAuth 2.0 RFC6749. """ from __future__ import absolute_import, unicode_literals - +import sys import logging from oauthlib.common import Request @@ -66,7 +66,8 @@ class AuthorizationEndpoint(BaseEndpoint): BaseEndpoint.__init__(self) self._response_types = {} # response_types are sorted internally so ordered comparison is faster/easier later - for k, v in response_types.iteritems(): + + for k, v in response_types.iteritems() if sys.version_info[0] == 2 else iter(response_types.items()): self._response_types[",".join(sorted(k.split()))] = v self._default_response_type = default_response_type |