fix exception on server blocks without server_name
This commit is contained in:
parent
dedb388e35
commit
2b62f37939
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ def generate_ssl(cfg: Path, domainstxt_file: Path) -> int:
|
||||||
config_part = _remove_comments(c[1])
|
config_part = _remove_comments(c[1])
|
||||||
|
|
||||||
for server_block in _get_server_blocks(config_part):
|
for server_block in _get_server_blocks(config_part):
|
||||||
sn = next(re.finditer(SERVER_NAME_RE, server_block))
|
sn = next(re.finditer(SERVER_NAME_RE, server_block), None)
|
||||||
if not sn:
|
if not sn:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue