mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 00:35:50 +02: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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user