mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 10:51:53 +02:00
renewer: _paths_parser
This commit is contained in:
+11
-2
@@ -96,12 +96,21 @@ def renew(cert, old_version):
|
|||||||
# (where fewer than all names were renewed)
|
# (where fewer than all names were renewed)
|
||||||
|
|
||||||
|
|
||||||
|
def _paths_parser(parser):
|
||||||
|
add = parser.add_argument_group("paths").add_argument
|
||||||
|
add("--config-dir", default=cli.flag_default("config_dir"),
|
||||||
|
help=cli.config_help("config_dir"))
|
||||||
|
add("--work-dir", default=cli.flag_default("work_dir"),
|
||||||
|
help=cli.config_help("work_dir"))
|
||||||
|
return parser
|
||||||
|
|
||||||
|
|
||||||
def _create_parser():
|
def _create_parser():
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
#parser.add_argument("--cron", action="store_true", help="Run as cronjob.")
|
#parser.add_argument("--cron", action="store_true", help="Run as cronjob.")
|
||||||
# pylint: disable=protected-access
|
# pylint: disable=protected-access
|
||||||
cli._paths_parser(parser.add_argument_group("paths"))
|
return _paths_parser(parser)
|
||||||
return parser
|
|
||||||
|
|
||||||
def main(config=None, args=sys.argv[1:]):
|
def main(config=None, args=sys.argv[1:]):
|
||||||
"""Main function for autorenewer script."""
|
"""Main function for autorenewer script."""
|
||||||
|
|||||||
Reference in New Issue
Block a user