From d47f0b8c99c7d2ed181ee01e51d3982f33c95238 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 31 Mar 2023 17:21:12 +0100 Subject: [PATCH] cve-generate-chartdata: Fix indentation Signed-off-by: Richard Purdie --- scripts/cve-generate-chartdata | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/scripts/cve-generate-chartdata b/scripts/cve-generate-chartdata index e043013..6b72310 100755 --- a/scripts/cve-generate-chartdata +++ b/scripts/cve-generate-chartdata @@ -32,20 +32,20 @@ for branch in os.listdir(args.resultsdir): if rounded_ts not in counts: counts[rounded_ts] = {} if branch not in counts[rounded_ts]: - cvereport = os.path.join(branchdir, f) - with open(cvereport) as report: - reportdata = json.load(report) - count = 0 - seen = [] - for package in reportdata['package']: - if branch in ['dunfell', 'kirkstone', 'langdale'] and if package['name'] in ['linux-yocto']: - continue - for issue in package['issue']: - if issue['status'] == "Unpatched" and issue['id'] not in seen: - count = count + 1 - seen.append(issue['id']) - print("Adding count %s for branch %s from file %s (ts %s)" % (count, branch, cvereport, rounded_ts)) - counts[rounded_ts][branch] = str(count) + cvereport = os.path.join(branchdir, f) + with open(cvereport) as report: + reportdata = json.load(report) + count = 0 + seen = [] + for package in reportdata['package']: + if branch in ['dunfell', 'kirkstone', 'langdale'] and if package['name'] in ['linux-yocto']: + continue + for issue in package['issue']: + if issue['status'] == "Unpatched" and issue['id'] not in seen: + count = count + 1 + seen.append(issue['id']) + print("Adding count %s for branch %s from file %s (ts %s)" % (count, branch, cvereport, rounded_ts)) + counts[rounded_ts][branch] = str(count) for c in counts: if int(c) > a_year_ago: