From 2b62f379390ed1523bd48e5eacbf67e0d0885a2e Mon Sep 17 00:00:00 2001 From: bain Date: Tue, 14 Jan 2025 23:04:50 +0100 Subject: [PATCH] fix exception on server blocks without server_name --- ncc/certs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ncc/certs.py b/ncc/certs.py index 0e3ab99..4d4594a 100644 --- a/ncc/certs.py +++ b/ncc/certs.py @@ -87,7 +87,7 @@ def generate_ssl(cfg: Path, domainstxt_file: Path) -> int: config_part = _remove_comments(c[1]) 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: continue