mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 00:22:28 +02:00
Help topics now working
This commit is contained in:
+4
-4
@@ -264,7 +264,7 @@ class HelpfulArgumentParser:
|
|||||||
assert max(True,"a") == "a", "Gravity changed direction"
|
assert max(True,"a") == "a", "Gravity changed direction"
|
||||||
help_arg = max(h1, h2)
|
help_arg = max(h1, h2)
|
||||||
self.visible_topics = self.determine_help_topics(help_arg)
|
self.visible_topics = self.determine_help_topics(help_arg)
|
||||||
print self.visible_topics
|
#print self.visible_topics
|
||||||
self.groups = {} # elements are added by .add_group()
|
self.groups = {} # elements are added by .add_group()
|
||||||
self.add_plugin_args(plugins)
|
self.add_plugin_args(plugins)
|
||||||
|
|
||||||
@@ -372,12 +372,12 @@ def create_parser(plugins, args):
|
|||||||
"really know what you're doing!")
|
"really know what you're doing!")
|
||||||
helpful.add(
|
helpful.add(
|
||||||
"testing", "--no-verify-ssl", action="store_true",
|
"testing", "--no-verify-ssl", action="store_true",
|
||||||
help=config_help("no_verify_ssl",hidden=True),
|
help=config_help("no_verify_ssl"),
|
||||||
default=flag_default("no_verify_ssl"))
|
default=flag_default("no_verify_ssl"))
|
||||||
# TODO: apache and nginx plugins do NOT respect it
|
# TODO: apache and nginx plugins do NOT respect it
|
||||||
helpful.add(
|
helpful.add(
|
||||||
"testing", "--dvsni-port", type=int, default=flag_default("dvsni_port"),
|
"testing", "--dvsni-port", type=int, default=flag_default("dvsni_port"),
|
||||||
help=config_help("dvsni_port",hidden=True))
|
help=config_help("dvsni_port"))
|
||||||
|
|
||||||
subparsers = helpful.parser.add_subparsers(metavar="SUBCOMMAND")
|
subparsers = helpful.parser.add_subparsers(metavar="SUBCOMMAND")
|
||||||
def add_subparser(name, func): # pylint: disable=missing-docstring
|
def add_subparser(name, func): # pylint: disable=missing-docstring
|
||||||
@@ -421,7 +421,7 @@ def create_parser(plugins, args):
|
|||||||
"security", description="Security parameters & server settings")
|
"security", description="Security parameters & server settings")
|
||||||
helpful.add("security", "-B", "--rsa-key-size", type=int, metavar="N",
|
helpful.add("security", "-B", "--rsa-key-size", type=int, metavar="N",
|
||||||
default=flag_default("rsa_key_size"),
|
default=flag_default("rsa_key_size"),
|
||||||
help=config_help("rsa_key_size",True))
|
help=config_help("rsa_key_size"))
|
||||||
# TODO: resolve - assumes binary logic while client.py assumes ternary.
|
# TODO: resolve - assumes binary logic while client.py assumes ternary.
|
||||||
helpful.add("security", "-r", "--redirect", action="store_true",
|
helpful.add("security", "-r", "--redirect", action="store_true",
|
||||||
help="Automatically redirect all HTTP traffic to HTTPS for the newly "
|
help="Automatically redirect all HTTP traffic to HTTPS for the newly "
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"""Plugin common functions."""
|
"""Plugin common functions."""
|
||||||
import zope.interface
|
import zope.interface
|
||||||
import argparse
|
|
||||||
|
|
||||||
from acme.jose import util as jose_util
|
from acme.jose import util as jose_util
|
||||||
|
|
||||||
@@ -56,7 +55,6 @@ class Plugin(object):
|
|||||||
# dummy function, doesn't check if dest.startswith(self.dest_namespace)
|
# dummy function, doesn't check if dest.startswith(self.dest_namespace)
|
||||||
def add(arg_name_no_prefix, *args, **kwargs):
|
def add(arg_name_no_prefix, *args, **kwargs):
|
||||||
# pylint: disable=missing-docstring
|
# pylint: disable=missing-docstring
|
||||||
kwargs["help"] = argparse.SUPPRESS
|
|
||||||
return parser.add_argument(
|
return parser.add_argument(
|
||||||
"--{0}{1}".format(option_namespace(name), arg_name_no_prefix),
|
"--{0}{1}".format(option_namespace(name), arg_name_no_prefix),
|
||||||
*args, **kwargs)
|
*args, **kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user