scripts: Fixed some issues with -k/--keep-open

- Fixed a NameError in watch.py caused by an outdated variable name
  (renamed paths -> keep_open_paths). Yay for dynamic typing.

- Fixed fieldnames is None issue when csv file is empty.
This commit is contained in:
Christopher Haster
2025-03-14 00:49:21 -05:00
parent 3a290c41ab
commit 0dbd1561ae
5 changed files with 5 additions and 5 deletions

View File

@@ -207,7 +207,7 @@ def collect(csv_paths, defines=[]):
with openio(path) as f:
reader = csv.DictReader(f, restval='')
fields.extend(
k for k in reader.fieldnames
k for k in reader.fieldnames or []
if k not in fields)
for r in reader:
# filter by matching defines