Commit 5c01be3d authored by Emil Velikov's avatar Emil Velikov Committed by Alexandros Frantzis

scripts/ bail out when path is missing

Passing non-existing path to os.scan(dir) will crash out.

Avoid that by checking (and appropriately exiting) if the path is
missing. This will result in invalid warning messages being printed as
follow-up, but we can live with that for now.
Signed-off-by: default avatarEmil Velikov <>
Reviewed-by: Alexandros Frantzis's avatarAlexandros Frantzis <>
parent c0a54c77
Pipeline #56326 failed with stages
in 5 minutes and 23 seconds
......@@ -10,6 +10,8 @@ def iter_trace_paths(directory):
def trace_has_images(trace_path, imagedir):
tracename =
refdir = str(trace_path.parent / imagedir)
if not os.path.isdir(refdir):
return False
for entry in os.scandir(refdir):
if entry.is_file() and and".png"):
return True
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment