From 8ca5d59a96366c1ec285f5e400e8e34d01a4d3b2 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sun, 30 Oct 2016 05:33:57 +0100 Subject: [PATCH] [mod] remove useless () --- src/yunohost/certificate.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/yunohost/certificate.py b/src/yunohost/certificate.py index c35d15f8e..9562a3a5f 100644 --- a/src/yunohost/certificate.py +++ b/src/yunohost/certificate.py @@ -249,7 +249,7 @@ def certificate_renew(auth, domainList, force=False, no_checks=False, email=Fals # If no domains given, consider all yunohost domains with Let's Encrypt # certificates - if (domainList == []): + if domainList == []: for domain in yunohost.domain.domain_list(auth)['domains']: # Does it has a Let's Encrypt cert ? @@ -258,10 +258,10 @@ def certificate_renew(auth, domainList, force=False, no_checks=False, email=Fals continue # Does it expires soon ? - if (force) or (status["validity"] <= validity_limit): + if force or status["validity"] <= validity_limit: domainList.append(domain) - if (len(domainList) == 0): + if len(domainList) == 0: logger.info("No certificate needs to be renewed.") # Else, validate the domain list given @@ -275,7 +275,7 @@ def certificate_renew(auth, domainList, force=False, no_checks=False, email=Fals status = _get_status(domain) # Does it expires soon ? - if not (force or status["validity"] <= validity_limit): + if not force or status["validity"] <= validity_limit: raise MoulinetteError(errno.EINVAL, m18n.n('certmanager_attempt_to_renew_valid_cert', domain=domain)) # Does it has a Let's Encrypt cert ?