mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 00:35:50 +02:00
Catch the right exception
Conrary to the docstring of choose_vhost(), when you run non-interactive certificate renewals and the Apache plugin fails to discover the correct vhost, it raises MissingCommandlineFlag and not PluginError.
This commit is contained in:
@@ -4,7 +4,7 @@ import os
|
||||
import logging
|
||||
|
||||
from certbot.plugins import common
|
||||
from certbot.errors import PluginError
|
||||
from certbot.errors import PluginError, MissingCommandlineFlag
|
||||
|
||||
from certbot_apache import obj
|
||||
from certbot_apache import parser
|
||||
@@ -124,7 +124,7 @@ class ApacheTlsSni01(common.TLSSNI01):
|
||||
|
||||
try:
|
||||
vhost = self.configurator.choose_vhost(achall.domain, temp=True)
|
||||
except PluginError:
|
||||
except (PluginError, MissingCommandlineFlag):
|
||||
# We couldn't find the virtualhost for this domain, possibly
|
||||
# because it's a new vhost that's not configured yet (GH #677),
|
||||
# or perhaps because there were multiple <VirtualHost> sections
|
||||
|
||||
Reference in New Issue
Block a user