Domain change wording (#4709)

* Change wording of renew with new domains msg to allow clearer display.

* Further improve domain change message formatting.

* Fix text formatting tests
This commit is contained in:
Aaron Cohen 2017-05-22 14:43:08 -07:00 committed by Brad Warren
parent 2680879068
commit 42c0117c16

View file

@ -254,12 +254,14 @@ def _ask_user_to_confirm_new_names(config, new_domains, certname, old_domains):
"""
if config.renew_with_new_domains:
return
msg = ("Confirm that you intend to update certificate {0} "
"to include domains {1}. Note that it previously "
"contained domains {2}.".format(
msg = ("You are updating certificate {0} to include domains: {1}{br}{br}"
"It previously included domains: {2}{br}{br}"
"Did you intend to make this change?".format(
certname,
new_domains,
old_domains))
", ".join(new_domains),
", ".join(old_domains),
br=os.linesep))
obj = zope.component.getUtility(interfaces.IDisplay)
if not obj.yesno(msg, "Update cert", "Cancel", default=True):
raise errors.ConfigurationError("Specified mismatched cert name and domains.")