mirror of
https://github.com/certbot/certbot.git
synced 2026-01-21 19:01:07 +03:00
Added additional errors to IPlugin.prepare interface
This commit is contained in:
@@ -444,7 +444,7 @@ class NginxConfigurator(common.Plugin):
|
||||
# nginx < 0.8.48 uses machine hostname as default server_name instead of
|
||||
# the empty string
|
||||
if nginx_version < (0, 8, 48):
|
||||
raise errors.PluginError("Nginx version must be 0.8.48+")
|
||||
raise errors.NotSupportedError("Nginx version must be 0.8.48+")
|
||||
|
||||
return nginx_version
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ class NginxConfiguratorTest(util.NginxTest):
|
||||
" (based on LLVM 3.5svn)",
|
||||
"TLS SNI support enabled",
|
||||
"configure arguments: --with-http_ssl_module"]))
|
||||
self.assertRaises(errors.PluginError, self.config.get_version)
|
||||
self.assertRaises(errors.NotSupportedError, self.config.get_version)
|
||||
|
||||
mock_popen.side_effect = OSError("Can't find program")
|
||||
self.assertRaises(errors.PluginError, self.config.get_version)
|
||||
|
||||
@@ -102,14 +102,19 @@ class IPlugin(zope.interface.Interface):
|
||||
def prepare():
|
||||
"""Prepare the plugin.
|
||||
|
||||
Finish up any additional initialization.
|
||||
Finish up any additional initialization.
|
||||
|
||||
:raises .MisconfigurationError:
|
||||
when full initialization cannot be completed. Plugin will
|
||||
be displayed on a list of available plugins.
|
||||
:raises .NoInstallationError:
|
||||
when the necessary programs/files cannot be located. Plugin
|
||||
will NOT be displayed on a list of available plugins.
|
||||
:raises .PluginError:
|
||||
when full initialization cannot be completed.
|
||||
:raises .MisconfigurationError:
|
||||
when full initialization cannot be completed. Plugin will
|
||||
be displayed on a list of available plugins.
|
||||
:raises .NoInstallationError:
|
||||
when the necessary programs/files cannot be located. Plugin
|
||||
will NOT be displayed on a list of available plugins.
|
||||
:raises .NotSupportedError:
|
||||
when the installation is recognized, but the version is not
|
||||
currently supported.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user