mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
domain/dns: don't miserably crash when the domain is known by lexicon but not in registrar_list.toml
This commit is contained in:
parent
29c6564f09
commit
b5b69e952d
1 changed files with 4 additions and 1 deletions
|
@ -591,7 +591,10 @@ def _get_registrar_config_section(domain):
|
|||
|
||||
# TODO : add a help tip with the link to the registar's API doc (c.f. Lexicon's README)
|
||||
registrar_list = read_toml(DOMAIN_REGISTRAR_LIST_PATH)
|
||||
registrar_credentials = registrar_list[registrar]
|
||||
registrar_credentials = registrar_list.get(registrar)
|
||||
if registrar_credentials is None:
|
||||
logger.warning(f"Registrar {registrar} unknown / Should be added to YunoHost's registrar_list.toml by the development team!")
|
||||
registrar_credentials = {}
|
||||
for credential, infos in registrar_credentials.items():
|
||||
infos["default"] = infos.get("default", "")
|
||||
infos["optional"] = infos.get("optional", "False")
|
||||
|
|
Loading…
Add table
Reference in a new issue