mirror of
https://github.com/certbot/certbot.git
synced 2026-01-26 07:41:33 +03:00
Add defaults / cli_flags for yesno() input
This commit is contained in:
@@ -156,7 +156,7 @@ def _determine_account(args, config):
|
||||
"server at {1}".format(
|
||||
regr.terms_of_service, config.server))
|
||||
return zope.component.getUtility(interfaces.IDisplay).yesno(
|
||||
msg, "Agree", "Cancel")
|
||||
msg, "Agree", "Cancel", cli_flag="--agree-tos")
|
||||
|
||||
try:
|
||||
acc, acme = client.register(
|
||||
@@ -315,7 +315,8 @@ def _handle_subset_cert_request(config, domains, cert):
|
||||
", ".join(domains),
|
||||
br=os.linesep)
|
||||
if config.expand or config.renew_by_default or zope.component.getUtility(
|
||||
interfaces.IDisplay).yesno(question, "Expand", "Cancel"):
|
||||
interfaces.IDisplay).yesno(question, "Expand", "Cancel",
|
||||
default=True):
|
||||
return "renew", cert
|
||||
else:
|
||||
reporter_util = zope.component.getUtility(interfaces.IReporter)
|
||||
|
||||
@@ -197,7 +197,8 @@ def choose_names(installer):
|
||||
"specify ServerNames in your config files in order to allow for "
|
||||
"accurate installation of your certificate.{0}"
|
||||
"If you do use the default vhost, you may specify the name "
|
||||
"manually. Would you like to continue?{0}".format(os.linesep))
|
||||
"manually. Would you like to continue?{0}".format(os.linesep),
|
||||
default=False, cli_flag="--domains")
|
||||
|
||||
if manual:
|
||||
return _choose_names_manually()
|
||||
|
||||
@@ -165,7 +165,8 @@ s.serve_forever()" """
|
||||
else:
|
||||
if not self.conf("public-ip-logging-ok"):
|
||||
if not zope.component.getUtility(interfaces.IDisplay).yesno(
|
||||
self.IP_DISCLAIMER, "Yes", "No"):
|
||||
self.IP_DISCLAIMER, "Yes", "No",
|
||||
cli_flag="--manual-public-ip-logging-ok"):
|
||||
raise errors.PluginError("Must agree to IP logging to proceed")
|
||||
|
||||
self._notify_and_wait(self.MESSAGE_TEMPLATE.format(
|
||||
|
||||
Reference in New Issue
Block a user