File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -63,10 +63,22 @@ def run_checker(self, filename):
63
63
except JSONDecodeError as e :
64
64
self .logger .debug (f"Error occurred while parsing { filename } : { e } " )
65
65
return
66
- for package in content ["object" ]["pins" ]:
67
- product = package ["package" ]
66
+
67
+ # Check the schema version
68
+ if content ["version" ] == 1 :
69
+ pins_object = content ["object" ]
70
+ pins = pins_object ["pins" ]
71
+ package_key = "package"
72
+ repo_key = "repositoryURL"
73
+ else :
74
+ pins = content ["pins" ]
75
+ package_key = "identity"
76
+ repo_key = "location"
77
+
78
+ for package in pins :
79
+ product = package [package_key ]
68
80
version = package ["state" ]["version" ]
69
- repository_url = package .get ("repositoryURL" , None )
81
+ repository_url = package .get (repo_key , None )
70
82
domain = None
71
83
if repository_url :
72
84
parse = urlparse (repository_url )
You can’t perform that action at this time.
0 commit comments