[mod] remove useless ()

This commit is contained in:
Laurent Peuch 2016-10-30 05:26:52 +01:00
parent a7b9226667
commit dd893b0838

View file

@ -506,13 +506,13 @@ def _get_status(domain):
daysRemaining = (validUpTo - datetime.now()).days daysRemaining = (validUpTo - datetime.now()).days
CAtype = None CAtype = None
if (certIssuer == _name_selfCA()): if certIssuer == _name_selfCA():
CAtype = "Self-signed" CAtype = "Self-signed"
elif (certIssuer.startswith("Let's Encrypt")): elif certIssuer.startswith("Let's Encrypt"):
CAtype = "Let's Encrypt" CAtype = "Let's Encrypt"
elif (certIssuer.startswith("Fake LE")): elif certIssuer.startswith("Fake LE"):
CAtype = "Fake Let's Encrypt" CAtype = "Fake Let's Encrypt"
else: else:
@ -522,23 +522,23 @@ def _get_status(domain):
statusSummaryCode = 0 statusSummaryCode = 0
# Critical # Critical
if (daysRemaining <= 0): if daysRemaining <= 0:
statusSummaryCode = -30 statusSummaryCode = -30
# Warning, self-signed, browser will display a warning discouraging visitors to enter website # Warning, self-signed, browser will display a warning discouraging visitors to enter website
elif (CAtype == "Self-signed") or (CAtype == "Fake Let's Encrypt"): elif CAtype == "Self-signed" or CAtype == "Fake Let's Encrypt":
statusSummaryCode = -20 statusSummaryCode = -20
# Attention, certificate will expire soon (should be renewed automatically if Let's Encrypt) # Attention, certificate will expire soon (should be renewed automatically if Let's Encrypt)
elif (daysRemaining < validity_limit): elif daysRemaining < validity_limit:
statusSummaryCode = -10 statusSummaryCode = -10
# CA not known, but still a valid certificate, so okay ! # CA not known, but still a valid certificate, so okay !
elif (CAtype == "Other / Unknown"): elif CAtype == "Other / Unknown":
statusSummaryCode = 10 statusSummaryCode = 10
# Let's Encrypt, great ! # Let's Encrypt, great !
elif (CAtype == "Let's Encrypt"): elif CAtype == "Let's Encrypt":
statusSummaryCode = 20 statusSummaryCode = 20
return { return {