mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[mod] small opti, getting domain list can be slow
This commit is contained in:
parent
02b5ea62fe
commit
8b24ab73c2
1 changed files with 2 additions and 1 deletions
|
@ -90,9 +90,10 @@ def certificate_status(auth, domain_list, full=False):
|
||||||
domain_list = yunohost.domain.domain_list(auth)['domains']
|
domain_list = yunohost.domain.domain_list(auth)['domains']
|
||||||
# Else, validate that yunohost knows the domains given
|
# Else, validate that yunohost knows the domains given
|
||||||
else:
|
else:
|
||||||
|
yunohost_domains_list = yunohost.domain.domain_list(auth)['domains']
|
||||||
for domain in domain_list:
|
for domain in domain_list:
|
||||||
# Is it in Yunohost domain list ?
|
# Is it in Yunohost domain list ?
|
||||||
if domain not in yunohost.domain.domain_list(auth)['domains']:
|
if domain not in yunohost_domains_list:
|
||||||
raise MoulinetteError(errno.EINVAL, m18n.n('certmanager_domain_unknown', domain=domain))
|
raise MoulinetteError(errno.EINVAL, m18n.n('certmanager_domain_unknown', domain=domain))
|
||||||
|
|
||||||
# Get status for each domain, and prepare display using tabulate
|
# Get status for each domain, and prepare display using tabulate
|
||||||
|
|
Loading…
Add table
Reference in a new issue