mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 19:02:52 +02:00
Set DEFAULTS during parse_args
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
"""Certbot command line argument & config processing."""
|
"""Certbot command line argument & config processing."""
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import argparse
|
import argparse
|
||||||
|
import copy
|
||||||
import glob
|
import glob
|
||||||
import logging
|
import logging
|
||||||
import logging.handlers
|
import logging.handlers
|
||||||
@@ -340,6 +341,10 @@ class HelpfulArgumentParser(object):
|
|||||||
if self.detect_defaults:
|
if self.detect_defaults:
|
||||||
return parsed_args
|
return parsed_args
|
||||||
|
|
||||||
|
global DEFAULTS # pylint: disable=global-statement
|
||||||
|
DEFAULTS = dict((key, copy.deepcopy(self.parser.get_default(key)))
|
||||||
|
for key in vars(parsed_args))
|
||||||
|
|
||||||
# Do any post-parsing homework here
|
# Do any post-parsing homework here
|
||||||
|
|
||||||
if self.verb == "renew" and not parsed_args.dialog_mode:
|
if self.verb == "renew" and not parsed_args.dialog_mode:
|
||||||
|
|||||||
Reference in New Issue
Block a user