This commit is contained in:
parent
93b7114ce2
commit
86a3c07396
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ def write_files(path: str, data: dict, max_num_entries: int) -> None:
|
|||
num_entries = 0
|
||||
# count entries in index file
|
||||
if pathlib.Path(f'{path}/index.gmi').is_file():
|
||||
num_entries = sum(1 for line in open(f'{path}/index.gmi')) # pylint: disable=consider-using-with
|
||||
num_entries = sum(1 for line in open(f'{path}/index.gmi')) # pylint: disable=consider-using-with
|
||||
|
||||
# if there is more articles than defined in max_num_entries, delete and rewrite
|
||||
if num_entries > max_num_entries:
|
||||
|
|
Loading…
Reference in a new issue