From 89c392d224befaaf0331b1937ae06f9216688854 Mon Sep 17 00:00:00 2001 From: Tim Nyborg Date: Tue, 17 Sep 2019 14:48:15 +0100 Subject: [PATCH 1/2] correcting indentation --- gluon/contrib/login_methods/saml2_auth.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gluon/contrib/login_methods/saml2_auth.py b/gluon/contrib/login_methods/saml2_auth.py index a791f0d3..0e454992 100644 --- a/gluon/contrib/login_methods/saml2_auth.py +++ b/gluon/contrib/login_methods/saml2_auth.py @@ -150,14 +150,14 @@ class Saml2Auth(object): self.config_file = config_file self.maps = maps - # URL for redirecting users to when they sign out + # URL for redirecting users to when they sign out self.saml_logout_url = logout_url # URL to let users change their password in the IDP system self.saml_change_password_url = change_password_url - # URL to specify an IDP if using federation metadata or an MDQ - self.entityid = entityid + # URL to specify an IDP if using federation metadata or an MDQ + self.entityid = entityid def login_url(self, next="/"): d = saml2_handler(current.session, current.request, entityid=self.entityid) From 2b30157ccea0d12de02b43c4a6a2f33e4ad43304 Mon Sep 17 00:00:00 2001 From: Tim Nyborg Date: Wed, 25 Sep 2019 11:06:23 +0100 Subject: [PATCH 2/2] Update redis_cache.py moving logging as well --- gluon/contrib/redis_cache.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gluon/contrib/redis_cache.py b/gluon/contrib/redis_cache.py index 3b92eef0..87437af7 100644 --- a/gluon/contrib/redis_cache.py +++ b/gluon/contrib/redis_cache.py @@ -208,12 +208,12 @@ class RedisClient(object): def retry_call(self, key, f, time_expire, with_lock): self.RETRIES += 1 - if self.RETRIES <= self.MAX_RETRIES: - logger.error("sleeping %s seconds before reconnecting" % (2 * self.RETRIES)) - time.sleep(2 * self.RETRIES) + if self.RETRIES <= self.MAX_RETRIES: if self.fail_gracefully: self.RETRIES = 0 return f() + logger.error("sleeping %s seconds before reconnecting" % (2 * self.RETRIES)) + time.sleep(2 * self.RETRIES) return self.__call__(key, f, time_expire, with_lock) else: self.RETRIES = 0