renewer: _paths_parser

This commit is contained in:
Jakub Warmuz 2015-06-25 05:35:15 +00:00
parent f5def6b6d6
commit b9f2823d6b
No known key found for this signature in database
GPG key ID: 2A7BAD3A489B52EA

View file

@ -96,12 +96,21 @@ def renew(cert, old_version):
# (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():
parser = argparse.ArgumentParser()
#parser.add_argument("--cron", action="store_true", help="Run as cronjob.")
# pylint: disable=protected-access
cli._paths_parser(parser.add_argument_group("paths"))
return parser
return _paths_parser(parser)
def main(config=None, args=sys.argv[1:]):
"""Main function for autorenewer script."""