mirror of
https://github.com/certbot/certbot.git
synced 2026-02-18 18:17:52 -05:00
Cherry-picks #10509 which fixes #10506. This will eventually make its way into the 5.2.2 point release Co-authored-by: Jacob Hoffman-Andrews <github@hoffman-andrews.com>
This commit is contained in:
parent
d3c30cfb2d
commit
305ebe1c16
3 changed files with 4 additions and 3 deletions
|
|
@ -320,7 +320,7 @@ class _WebrootPathAction(argparse.Action):
|
|||
# domains before setting the new webroot path
|
||||
prev_webroot = namespace.webroot_path[-1]
|
||||
for domain in namespace.domains:
|
||||
namespace.webroot_map.setdefault(domain, prev_webroot)
|
||||
namespace.webroot_map.setdefault(domain.dns_name, prev_webroot)
|
||||
elif namespace.domains:
|
||||
self._domain_before_webroot = True
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ from certbot import errors
|
|||
from certbot.compat import filesystem
|
||||
from certbot.compat import os
|
||||
from certbot.display import util as display_util
|
||||
from certbot._internal import cli
|
||||
from certbot.tests import acme_util
|
||||
from certbot.tests import util as test_util
|
||||
|
||||
|
|
@ -302,7 +303,6 @@ class AuthenticatorTest(unittest.TestCase):
|
|||
assert not os.path.exists(self.validation_path)
|
||||
assert os.path.exists(self.root_challenge_path)
|
||||
|
||||
|
||||
class WebrootActionTest(unittest.TestCase):
|
||||
"""Tests for webroot argparse actions."""
|
||||
|
||||
|
|
@ -314,7 +314,7 @@ class WebrootActionTest(unittest.TestCase):
|
|||
self.path = tempfile.mkdtemp()
|
||||
self.parser = argparse.ArgumentParser()
|
||||
self.parser.add_argument("-d", "--domains",
|
||||
action="append", default=[])
|
||||
action=cli._DomainsAction, default=[])
|
||||
Authenticator.inject_parser_options(self.parser, "webroot")
|
||||
|
||||
def test_webroot_map_action(self):
|
||||
|
|
|
|||
1
newsfragments/10509.fixed
Normal file
1
newsfragments/10509.fixed
Normal file
|
|
@ -0,0 +1 @@
|
|||
Fixed a regression that caused certbot to crash if multiple --webroot-path values were set on the command line.
|
||||
Loading…
Reference in a new issue