mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
changed cert acme status to a string to add 'unknown' status (when not diagnosed)
This commit is contained in:
parent
d848837bc6
commit
7b7c5f0b13
2 changed files with 8 additions and 4 deletions
|
@ -98,9 +98,13 @@ def certificate_status(domains, full=False):
|
|||
if full:
|
||||
try:
|
||||
_check_domain_is_ready_for_ACME(domain)
|
||||
status["ACME_eligible"] = True
|
||||
except Exception:
|
||||
status["ACME_eligible"] = False
|
||||
status["acme_status"] = 'eligible'
|
||||
except Exception as e:
|
||||
if e.key == 'certmanager_domain_not_diagnosed_yet':
|
||||
status["acme_status"] = 'unknown'
|
||||
else:
|
||||
status["acme_status"] = 'ineligible'
|
||||
|
||||
|
||||
del status["domain"]
|
||||
certificates[domain] = status
|
||||
|
|
|
@ -192,7 +192,7 @@ def domain_info(domains):
|
|||
"certificate": {
|
||||
"authority": certs[domain]["CA_type"]["code"],
|
||||
"validity": certs[domain]["validity"],
|
||||
"ACME_eligible": certs[domain]["ACME_eligible"],
|
||||
"acme_status": certs[domain]["acme_status"],
|
||||
},
|
||||
"dns": get_dns_config(domain),
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue