This is reportedly the correct magic

This commit is contained in:
Peter Eckersley 2016-08-08 18:08:11 -07:00
parent 712bd9ee6b
commit b5fa0fbad7
2 changed files with 2 additions and 2 deletions

View file

@ -341,7 +341,7 @@ class NginxConfigurator(common.Plugin):
options_subblock = self.parser.loc["ssl_options"]
# the options file doesn't have a newline at the beginning, but there
# needs to be one when it's dropped into the file
if "\n" not in options_subblock[0]:
if options_subblock and "\n" not in options_subblock[0]:
options_subblock[0].insert(0, "\n")
ssl_block = (
[['\n ', 'listen', ' ', '{0} ssl'.format(self.config.tls_sni_01_port)],

View file

@ -179,7 +179,7 @@ class NginxParser(object):
with open(ssl_options) as _file:
return nginxparser.load(_file).spaced
except IOError:
logger.debug("Could not open file: %s", ssl_options)
logger.warn("Missing NGINX TLS options file: %s", ssl_options)
except pyparsing.ParseException:
logger.debug("Could not parse file: %s", ssl_options)
return []