Skip to content

filter-known-issues.py fails if input file is empty #1542

@dbkinder

Description

@dbkinder

if the log file being processed by filter-known-issues.py is empty (i.e., there are no errors), the script should gracefully exit. Instead it throws an error saying:

~/zephyr/doc$ touch noerror.log
 ~/zephyr/doc$ ../scripts/filter-known-issues.py --config-dir ../.known-issues/doc noerror.log
ERROR: noerror.log: cannot load: cannot mmap an empty file
Traceback (most recent call last):
  File "../scripts/filter-known-issues.py", line 193, in <module>
    mm = mmap.mmap(f.fileno(), 0)
ValueError: cannot mmap an empty file

Metadata

Metadata

Assignees

Labels

bugThe issue is a bug, or the PR is fixing a bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions