cve-generate-chartdata: Fix indentation

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2023-03-31 17:21:12 +01:00
parent 3f489eb396
commit d47f0b8c99

View File

@ -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: