File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -10,23 +10,17 @@ def report(
1010):
1111 """
1212 Prints issues in JSON format.
13-
1413 Args:
1514 vulnerabilities: list of vulnerabilities to report
1615 fileobj: The output file object, which may be sys.stdout
1716 """
1817 TZ_AGNOSTIC_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
1918 time_string = datetime .utcnow ().strftime (TZ_AGNOSTIC_FORMAT )
20- try :
21- machine_output = {
22- 'generated_at' : time_string ,
23- 'vulnerabilities' : [vuln .as_dict () for vuln in vulnerabilities ]
24- }
25- except :
26- machine_output = {
27- 'generated_at' : time_string ,
28- 'vulnerabilities' : [vuln for vuln in vulnerabilities ]
29- }
19+
20+ machine_output = {
21+ 'generated_at' : time_string ,
22+ 'vulnerabilities' : [vuln .as_dict () for vuln in vulnerabilities ]
23+ }
3024
3125 result = json .dumps (
3226 machine_output ,
You can’t perform that action at this time.
0 commit comments