mirror of
https://github.com/certbot/certbot.git
synced 2026-06-04 14:26:10 -04:00
This is reportedly the correct magic
This commit is contained in:
parent
712bd9ee6b
commit
b5fa0fbad7
2 changed files with 2 additions and 2 deletions
|
|
@ -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)],
|
||||
|
|
|
|||
|
|
@ -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 []
|
||||
|
|
|
|||
Loading…
Reference in a new issue