saml: Use self.logger in get_issuing_idp.

get_issuing_idp is no longer a class method, so that akward logger
fetching can be skipped and self.logger can be accessed.
This commit is contained in:
Mateusz Mandera
2020-07-25 14:52:01 +02:00
committed by Tim Abbott
parent 389c190d49
commit 9d1f77edc5

View File

@@ -1797,8 +1797,7 @@ class SAMLAuthBackend(SocialAuthMixin, SAMLAuth):
resp = OneLogin_Saml2_Response(settings=saml_settings, response=SAMLResponse)
issuers = resp.get_issuers()
except self.SAMLRESPONSE_PARSING_EXCEPTIONS:
logger = logging.getLogger(f"zulip.auth.{self.name}")
logger.info("Error while parsing SAMLResponse:", exc_info=True)
self.logger.info("Error while parsing SAMLResponse:", exc_info=True)
return None
for idp_name, idp_config in settings.SOCIAL_AUTH_SAML_ENABLED_IDPS.items():