mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 00:02:14 -04:00
ConfArgParse -> ConfigArgParse
ConfArgParse + subparsers = config scoped only to subcommand ConfArgParse doesn't seem to respect formatter_class (no defaults) ConfigArgParse works with ENV variables https://github.com/bw2/ConfigArgParse#design-notes
This commit is contained in:
parent
975fe1c65b
commit
1001b027cb
2 changed files with 6 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ import logging
|
|||
import pkg_resources
|
||||
import sys
|
||||
|
||||
import confargparse
|
||||
import configargparse
|
||||
import zope.component
|
||||
import zope.interface.exceptions
|
||||
import zope.interface.verify
|
||||
|
|
@ -213,7 +213,10 @@ def read_file(filename):
|
|||
|
||||
def create_parser():
|
||||
"""Create parser."""
|
||||
parser = confargparse.ConfArgParser(description=__doc__)
|
||||
parser = configargparse.ArgParser(
|
||||
description=__doc__,
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
||||
args_for_setting_config_path=["-c", "--config"])
|
||||
|
||||
# --help is automatically provided by argparse
|
||||
parser.add_argument(
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -28,7 +28,7 @@ changes = read_file(os.path.join(here, 'CHANGES.rst'))
|
|||
|
||||
install_requires = [
|
||||
'argparse',
|
||||
'ConfArgParse',
|
||||
'ConfigArgParse',
|
||||
'jsonschema',
|
||||
'mock',
|
||||
'ndg-httpsclient', # urllib3 InsecurePlatformWarning (#304)
|
||||
|
|
|
|||
Loading…
Reference in a new issue