mirror of
https://github.com/certbot/certbot.git
synced 2026-06-03 13:59:02 -04: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:
parent
528a816f70
commit
8b4f48556d
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue