mirror of
https://github.com/certbot/certbot.git
synced 2026-05-28 04:34:11 -04:00
python3 support
This commit is contained in:
parent
8022d6c6f0
commit
5ddde6b9ea
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue