mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 10:42:11 +02:00
CLI: use_curses -> text_mode
Previously, the --help output seemed to be broken:
-t, --text Use the text output instead of the curses UI.
(default: True)
This commit is contained in:
@@ -236,7 +236,7 @@ def create_parser(plugins):
|
|||||||
help="Turn off confirmation screens, currently used for --revoke")
|
help="Turn off confirmation screens, currently used for --revoke")
|
||||||
add("-e", "--agree-tos", dest="tos", action="store_true",
|
add("-e", "--agree-tos", dest="tos", action="store_true",
|
||||||
help="Skip the end user license agreement screen.")
|
help="Skip the end user license agreement screen.")
|
||||||
add("-t", "--text", dest="use_curses", action="store_false",
|
add("-t", "--text", dest="text_mode", action="store_true",
|
||||||
help="Use the text output instead of the curses UI.")
|
help="Use the text output instead of the curses UI.")
|
||||||
|
|
||||||
subparsers = parser.add_subparsers(metavar="SUBCOMMAND")
|
subparsers = parser.add_subparsers(metavar="SUBCOMMAND")
|
||||||
@@ -339,10 +339,10 @@ def main(args=sys.argv[1:]):
|
|||||||
config = configuration.NamespaceConfig(args)
|
config = configuration.NamespaceConfig(args)
|
||||||
|
|
||||||
# Displayer
|
# Displayer
|
||||||
if args.use_curses:
|
if args.text_mode:
|
||||||
displayer = display_util.NcursesDisplay()
|
|
||||||
else:
|
|
||||||
displayer = display_util.FileDisplay(sys.stdout)
|
displayer = display_util.FileDisplay(sys.stdout)
|
||||||
|
else:
|
||||||
|
displayer = display_util.NcursesDisplay()
|
||||||
zope.component.provideUtility(displayer)
|
zope.component.provideUtility(displayer)
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
@@ -350,7 +350,7 @@ def main(args=sys.argv[1:]):
|
|||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
logger.setLevel(level)
|
logger.setLevel(level)
|
||||||
logging.debug("Logging level set at %d", level)
|
logging.debug("Logging level set at %d", level)
|
||||||
if args.use_curses:
|
if not args.text_mode:
|
||||||
logger.addHandler(log.DialogHandler())
|
logger.addHandler(log.DialogHandler())
|
||||||
|
|
||||||
logging.debug("Discovered plugins: %r", plugins)
|
logging.debug("Discovered plugins: %r", plugins)
|
||||||
|
|||||||
Reference in New Issue
Block a user