mirror of
https://github.com/hohn/sarif-cli.git
synced 2025-12-16 17:23:03 +01:00
Log missing files, but try to continue execution
This commit is contained in:
committed by
=Michael Hohn
parent
502cb21850
commit
9f3be7bcb0
@@ -52,6 +52,9 @@ def load_lines(root, path, line_from, line_to):
|
||||
Newlines are dropped.
|
||||
"""
|
||||
fname = os.path.join(root, path)
|
||||
if not os.path.exists(fname):
|
||||
dbg("Missing file: %s" % fname)
|
||||
return []
|
||||
with open(fname, 'r') as file:
|
||||
lines = file.readlines()
|
||||
return [line.rstrip("\n\r").replace("\t", " ")
|
||||
|
||||
Reference in New Issue
Block a user