Fix import_module call.

This commit is contained in:
Dan Sully 2016-10-26 10:49:22 -04:00 committed by GitHub
parent 5c63aa6f88
commit 2e0035e4fa

View File

@ -930,7 +930,7 @@ class MetadataStore(MetaData):
raise SAMLError("Misconfiguration in metadata %s" % item) raise SAMLError("Misconfiguration in metadata %s" % item)
mod, clas = key.rsplit('.', 1) mod, clas = key.rsplit('.', 1)
try: try:
mod = import_module(mod) mod = importlib.import_module(mod)
MDloader = getattr(mod, clas) MDloader = getattr(mod, clas)
except (ImportError, AttributeError): except (ImportError, AttributeError):
raise SAMLError("Unknown metadata loader %s" % key) raise SAMLError("Unknown metadata loader %s" % key)