File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ def main(argv=None):
181181
182182 # Check for rogue catalogs.
183183 if args .catalogs :
184- for catalog in pkginfo .get ("catalogs" ):
184+ for catalog in pkginfo .get ("catalogs" , [] ):
185185 if catalog not in args .catalogs :
186186 print (f'{ filename } : catalog "{ catalog } " is not in approved list' )
187187 retval = 1
@@ -269,7 +269,7 @@ def main(argv=None):
269269 # Credit to @bruienne for this idea.
270270 # https://gist.github.com/bruienne/9baa958ec6dbe8f09d94#file-munki_fuzzinator-py-L211-L219
271271 if "items_to_copy" in pkginfo :
272- for item_to_copy in pkginfo .get ("items_to_copy" ):
272+ for item_to_copy in pkginfo .get ("items_to_copy" , [] ):
273273 if item_to_copy .get ("destination_path" ).endswith ("/" ):
274274 print (
275275 f'{ filename } : has an items_to_copy with a trailing slash: "{ item_to_copy ["destination_path" ]} "'
You can’t perform that action at this time.
0 commit comments