mirror of
https://git.nolog.cz/NoLog.cz/nginx-configurator.git
synced 2025-01-31 03:43:35 +01:00
fix shell completion when cfg has server block w/o server_name
This commit is contained in:
parent
327ca01f3a
commit
a84b66eb88
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ def get_sites(cfg: Path) -> Generator[Tuple[Path, str]]:
|
|||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue