From 2953d3b2ee8f961489379a1be49136d8b9d3b974 Mon Sep 17 00:00:00 2001 From: James Kasten Date: Fri, 31 Jul 2015 13:23:31 -0700 Subject: [PATCH] Associate vhost with name after selection --- letsencrypt-apache/letsencrypt_apache/configurator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/letsencrypt-apache/letsencrypt_apache/configurator.py b/letsencrypt-apache/letsencrypt_apache/configurator.py index 7cda8066c..963945d8a 100644 --- a/letsencrypt-apache/letsencrypt_apache/configurator.py +++ b/letsencrypt-apache/letsencrypt_apache/configurator.py @@ -267,12 +267,11 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator): "in the Apache config", target_name) raise errors.PluginError("No vhost selected") - if not vhost.ssl: + elif not vhost.ssl: addrs = self._get_proposed_addrs(vhost, "443") # TODO: Conflicts is too conservative if not any(vhost.enabled and vhost.conflicts(addrs) for vhost in self.vhosts): vhost = self.make_vhost_ssl(vhost) - self.assoc[target_name] = vhost else: logger.error( "The selected vhost would conflict with other HTTPS " @@ -280,6 +279,8 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator): "vhost or add ServerNames to your configuration.") raise errors.PluginError( "VirtualHost not able to be selected.") + + self.assoc[target_name] = vhost return vhost