mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 00:35:50 +02:00
"Renew" now ignores domains in cli.ini (#4479)
* "Renew" now ignores domains in cli.ini * Document things slightly better * fix variable names * py3fix
This commit is contained in:
@@ -515,6 +515,13 @@ class HelpfulArgumentParser(object):
|
||||
|
||||
return usage
|
||||
|
||||
def remove_config_file_domains_for_renewal(self, parsed_args):
|
||||
"""Make "certbot renew" safe if domains are set in cli.ini."""
|
||||
# Works around https://github.com/certbot/certbot/issues/4096
|
||||
if self.verb == "renew":
|
||||
for source, flags in self.parser._source_to_settings.items(): # pylint: disable=protected-access
|
||||
if source.startswith("config_file") and "domains" in flags:
|
||||
parsed_args.domains = _Default() if self.detect_defaults else []
|
||||
|
||||
def parse_args(self):
|
||||
"""Parses command line arguments and returns the result.
|
||||
@@ -527,6 +534,8 @@ class HelpfulArgumentParser(object):
|
||||
parsed_args.func = self.VERBS[self.verb]
|
||||
parsed_args.verb = self.verb
|
||||
|
||||
self.remove_config_file_domains_for_renewal(parsed_args)
|
||||
|
||||
if self.detect_defaults:
|
||||
return parsed_args
|
||||
|
||||
|
||||
Reference in New Issue
Block a user