mirror of
https://github.com/certbot/certbot.git
synced 2026-05-28 04:34:11 -04:00
Fix merge bugs & address other review comments
This commit is contained in:
parent
fe29a434f5
commit
747bd2715f
2 changed files with 3 additions and 5 deletions
|
|
@ -1337,8 +1337,6 @@ class WebrootPathProcessor(argparse.Action): # pylint: disable=missing-docstring
|
|||
args.webroot_path.append(webroot)
|
||||
|
||||
|
||||
_undot = lambda domain: domain[:-1] if domain.endswith('.') else domain
|
||||
|
||||
def _process_domain(args_or_config, domain_arg, webroot_path=None):
|
||||
"""
|
||||
Process a new -d flag, helping the webroot plugin construct a map of
|
||||
|
|
@ -1352,8 +1350,8 @@ def _process_domain(args_or_config, domain_arg, webroot_path=None):
|
|||
webroot_path = webroot_path if webroot_path else args_or_config.webroot_path
|
||||
|
||||
for domain in (d.strip() for d in domain_arg.split(",")):
|
||||
domain = le_util.enforce_domain_sanity(domain)
|
||||
if domain not in args_or_config.domains:
|
||||
domain = _undot(domain)
|
||||
args_or_config.domains.append(domain)
|
||||
# Each domain has a webroot_path of the most recent -w flag
|
||||
# unless it was explicitly included in webroot_map
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods
|
|||
with mock.patch("letsencrypt.cli._init_le_client") as mock_init:
|
||||
with mock.patch("letsencrypt.cli._auth_from_domains"):
|
||||
self._call(["certonly", "--manual", "-d", "foo.bar"])
|
||||
_config, auth, _installer = mock_init.call_args[0]
|
||||
unused_config, auth, unused_installer = mock_init.call_args[0]
|
||||
self.assertTrue(isinstance(auth, manual.Authenticator))
|
||||
|
||||
with MockedVerb("certonly") as mock_certonly:
|
||||
|
|
@ -316,7 +316,7 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods
|
|||
'--chain-path', 'chain',
|
||||
'--fullchain-path', 'fullchain'])
|
||||
|
||||
config, _plugins = mock_obtaincert.call_args[0]
|
||||
config, unused_plugins = mock_obtaincert.call_args[0]
|
||||
self.assertEqual(config.cert_path, os.path.abspath(cert))
|
||||
self.assertEqual(config.key_path, os.path.abspath(key))
|
||||
self.assertEqual(config.chain_path, os.path.abspath(chain))
|
||||
|
|
|
|||
Loading…
Reference in a new issue