letsencrypt argument for vhosts is optionaly, do not crash

This commit is contained in:
nd 2019-11-01 22:33:10 +01:00
parent 7350ebc52f
commit ca4380d4af
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9

View file

@ -8,7 +8,7 @@ class FilterModule(object):
def nginx_vhosts_to_certificates(self, vhosts): def nginx_vhosts_to_certificates(self, vhosts):
certs = {} certs = {}
for i in vhosts.keys(): for i in vhosts.keys():
if not vhosts[i]['letsencrypt']: if not vhosts[i].get('letsencrypt'):
continue continue
certs['nginx_'+i] = { certs['nginx_'+i] = {
'backend': 'letsencrypt', 'backend': 'letsencrypt',