Skip to content

Commit ce05d8f

Browse files
ReeceReece
authored andcommitted
python 3.5+ apparnelty returns a dict_keys object from .keys() so account for that.
1 parent bd44fc0 commit ce05d8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

djangosaml2/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ def get_idp_sso_supported_bindings(idp_entity_id=None, config=None):
4949
meta = getattr(config, 'metadata', {})
5050
# if idp is None, assume only one exists so just use that
5151
if idp_entity_id is None:
52-
idp_entity_id = available_idps(config).keys().pop()
52+
# .keys() returns dict_keys in python3.5+
53+
idp_entity_id = list(available_idps(config).keys()).pop()
5354
try:
5455
return meta.service(idp_entity_id, 'idpsso_descriptor', 'single_sign_on_service').keys()
5556
except UnknownSystemEntity:

0 commit comments

Comments
 (0)