From 6e0a68f844d933719472493a697215f1db9fb1f3 Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Fri, 16 Sep 2016 14:21:13 -0700 Subject: [PATCH 1/2] Improve error message for "no installer plugin." --- certbot/plugins/selection.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/certbot/plugins/selection.py b/certbot/plugins/selection.py index a7388c4e1..dea9d970c 100644 --- a/certbot/plugins/selection.py +++ b/certbot/plugins/selection.py @@ -261,9 +261,10 @@ def diagnose_configurator_problem(cfg_type, requested, plugins): "your existing configuration.\nThe error was: {1!r}" .format(requested, plugins[requested].problem)) elif cfg_type == "installer": - msg = ('No installer plugins seem to be present and working on your system; ' - 'fix that or try running certbot with the "certonly" command to obtain' - ' a certificate you can install manually') + msg = ('Certbot doesn\'t know how to automatically configure the web ' + 'server on this system. However, it can still get a certificate for ' + 'you. Please run "certbot[-auto] certonly" to do so. You\'ll need to ' + 'manually configure your web server to use the resulting certificate.') else: msg = "{0} could not be determined or is not installed".format(cfg_type) raise errors.PluginSelectionError(msg) From 3eaafcecad22913169b67751728a19f3f05957b5 Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Fri, 16 Sep 2016 18:45:21 -0700 Subject: [PATCH 2/2] Use cli_command to print. --- certbot/plugins/selection.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/certbot/plugins/selection.py b/certbot/plugins/selection.py index dea9d970c..3fbc510ba 100644 --- a/certbot/plugins/selection.py +++ b/certbot/plugins/selection.py @@ -261,10 +261,12 @@ def diagnose_configurator_problem(cfg_type, requested, plugins): "your existing configuration.\nThe error was: {1!r}" .format(requested, plugins[requested].problem)) elif cfg_type == "installer": + from certbot.cli import cli_command msg = ('Certbot doesn\'t know how to automatically configure the web ' 'server on this system. However, it can still get a certificate for ' - 'you. Please run "certbot[-auto] certonly" to do so. You\'ll need to ' - 'manually configure your web server to use the resulting certificate.') + 'you. Please run "{0} certonly" to do so. You\'ll need to ' + 'manually configure your web server to use the resulting ' + 'certificate.').format(cli_command) else: msg = "{0} could not be determined or is not installed".format(cfg_type) raise errors.PluginSelectionError(msg)