We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3db578c commit 7088262Copy full SHA for 7088262
examples/client/read_scan_status.py
@@ -35,14 +35,12 @@
35
status = {"STARTED": 0, "SUCCESS": 0, "FAILURE": 0}
36
codelocations = bd.get_resource('codeLocations')
37
for codelocation in codelocations:
38
- latest_summaries = bd.get_resource('scans', codelocation)
39
- for summary in latest_summaries:
40
- scan_state = summary['scanState']
41
- if scan_state in status:
42
- status[scan_state] += 1
43
- else:
44
- status[scan_state] =1
45
- break
+ latest_scan_summary = bd.get_resource('latest-scan',codelocation, items = False)
+ scan_state = latest_scan_summary['scanState']
+ if scan_state in status:
+ status[scan_state] += 1
+ else:
+ status[scan_state] =1
46
47
print (status)
48
0 commit comments