mirror of
git://git.yoctoproject.org/yocto-autobuilder-helper.git
synced 2025-07-19 20:59:02 +02:00
cve-generate-chartdata: Handle unexpected files in the stats directory
A build of "stable/dunfell-nut" caused incorrect data to be added to the metrics repo and resulted in script failures. Handle this situation better. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
87db0dccbc
commit
e2ebe3dc11
|
@ -28,7 +28,11 @@ for branch in os.listdir(args.resultsdir):
|
||||||
branchdir = os.path.join(args.resultsdir, branch)
|
branchdir = os.path.join(args.resultsdir, branch)
|
||||||
for f in os.listdir(branchdir):
|
for f in os.listdir(branchdir):
|
||||||
ts = f.split(".")[0]
|
ts = f.split(".")[0]
|
||||||
rounded_ts = str(round_to_day(ts))
|
try:
|
||||||
|
rounded_ts = str(round_to_day(ts))
|
||||||
|
except ValueError:
|
||||||
|
# Couldn't parse a timestamp from filename
|
||||||
|
continue
|
||||||
if rounded_ts not in counts:
|
if rounded_ts not in counts:
|
||||||
counts[rounded_ts] = {}
|
counts[rounded_ts] = {}
|
||||||
if branch not in counts[rounded_ts]:
|
if branch not in counts[rounded_ts]:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user