mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
fix: do not fail with KeyError if there is no acme_account_url
perform_initial_checks may exit early and not add `acme_account_url` if required DNS records are not found. We should not fail with KeyError if user runs `cmdeploy dns` on a completely fresh unconfigured server.
This commit is contained in:
@@ -74,7 +74,7 @@ def run_cmd(args, out):
|
||||
retcode = out.check_call(cmd, env=env)
|
||||
if retcode == 0:
|
||||
out.green("Deploy completed, call `cmdeploy dns` next.")
|
||||
elif not remote_data["acme_account_url"]:
|
||||
elif not remote_data.get("acme_account_url"):
|
||||
out.red("Deploy completed but letsencrypt not configured")
|
||||
out.red("Run 'cmdeploy run' again")
|
||||
retcode = 0
|
||||
@@ -100,7 +100,7 @@ def dns_cmd(args, out):
|
||||
if not remote_data:
|
||||
return 1
|
||||
|
||||
if not remote_data["acme_account_url"]:
|
||||
if not remote_data.get("acme_account_url"):
|
||||
out.red("could not get letsencrypt account url, please run 'cmdeploy run'")
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user