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