Add defaults / cli_flags for yesno() input

This commit is contained in:
Peter Eckersley
2015-12-29 00:03:57 -08:00
parent d471169b6b
commit 6daaa7a763
3 changed files with 7 additions and 4 deletions
+2 -1
View File
@@ -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(