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 26a3bc0 commit 217eb0fCopy full SHA for 217eb0f
pyt/formatters/json.py
@@ -17,11 +17,16 @@ def report(
17
"""
18
TZ_AGNOSTIC_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
19
time_string = datetime.utcnow().strftime(TZ_AGNOSTIC_FORMAT)
20
-
21
- machine_output = {
22
- 'generated_at': time_string,
23
- 'vulnerabilities': [vuln.as_dict() for vuln in vulnerabilities]
24
- }
+ try:
+ machine_output = {
+ 'generated_at': time_string,
+ 'vulnerabilities': [vuln.as_dict() for vuln in vulnerabilities]
+ }
25
+ except:
26
27
28
+ 'vulnerabilities': [vuln for vuln in vulnerabilities]
29
30
31
result = json.dumps(
32
machine_output,
0 commit comments