Skip to content
Prev Previous commit
Next Next commit
python 3.5+ apparnelty returns a dict_keys object from .keys() so acc…
…ount for that.
  • Loading branch information
Reece authored and Reece committed Apr 12, 2017
commit ce05d8ff095455a727329a9a9588f7a19198abb2
3 changes: 2 additions & 1 deletion djangosaml2/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def get_idp_sso_supported_bindings(idp_entity_id=None, config=None):
meta = getattr(config, 'metadata', {})
# if idp is None, assume only one exists so just use that
if idp_entity_id is None:
idp_entity_id = available_idps(config).keys().pop()
# .keys() returns dict_keys in python3.5+
idp_entity_id = list(available_idps(config).keys()).pop()
try:
return meta.service(idp_entity_id, 'idpsso_descriptor', 'single_sign_on_service').keys()
except UnknownSystemEntity:
Expand Down