Yapf code formatting

This commit is contained in:
Khanh Ngo 2019-12-15 09:40:05 +07:00
parent 32236faae8
commit de581e9e1d
No known key found for this signature in database
GPG Key ID: A945965CD6351844

View File

@ -6,6 +6,7 @@ import os
from ..lib.certutil import KEY_FILE, CERT_FILE
from ..lib.utils import urlparse
class SAML(object):
def __init__(self):
if current_app.config['SAML_ENABLED']:
@ -34,10 +35,10 @@ class SAML(object):
'SAML: IDP Metadata initial load failed')
exit(-1)
def get_idp_data(self):
lifetime = timedelta(minutes=current_app.config['SAML_METADATA_CACHE_LIFETIME'])
lifetime = timedelta(
minutes=current_app.config['SAML_METADATA_CACHE_LIFETIME'])
if self.idp_timestamp + lifetime < datetime.now():
background_thread = Thread(target=self.retrieve_idp_data())
@ -45,7 +46,6 @@ class SAML(object):
return self.idp_data
def retrieve_idp_data(self):
if 'SAML_IDP_SSO_BINDING' in current_app.config: