From 5ddde6b9eae38a6715569ae3872d7ea67e1e6a24 Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Wed, 4 Oct 2017 13:50:03 -0700 Subject: [PATCH] python3 support --- certbot-nginx/certbot_nginx/configurator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/certbot-nginx/certbot_nginx/configurator.py b/certbot-nginx/certbot_nginx/configurator.py index b56419723..daa1494a6 100644 --- a/certbot-nginx/certbot_nginx/configurator.py +++ b/certbot-nginx/certbot_nginx/configurator.py @@ -273,15 +273,15 @@ class NginxConfigurator(common.Installer): def _get_default_vhost(self): vhost_list = self.parser.get_vhosts() # if one has default_server set, return that one - default_vhosts = set() + default_vhosts = [] for vhost in vhost_list: for addr in vhost.addrs: if addr.default: - default_vhosts.add(vhost) + default_vhosts.append(vhost) break if len(default_vhosts) == 1: - return next(iter(default_vhosts)) + return default_vhosts[0] # TODO: present a list of vhosts for user to choose from