mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 08:05:31 +02:00
Fix merge bugs & address other review comments
This commit is contained in:
+1
-3
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user