@@ -43,7 +43,7 @@ def validate_required_keys(input_dict, required_keys, dict_name, filename):
4343 """Verifies that required_keys are present in dictionary."""
4444 passed = True
4545 for req_key in required_keys :
46- if not input_dict .get (req_key ) :
46+ if input_dict .get (req_key , "" ) == "" :
4747 print ("{}: {} missing required key {}" .format (filename , dict_name , req_key ))
4848 passed = False
4949 return passed
@@ -338,12 +338,12 @@ def validate_subkeys(subkeys, filename):
338338 if not validate_pfm_type_strings (subkey , filename ):
339339 passed = False
340340
341- # Check that list items are of the expected type
342- if "pfm_type " not in subkey :
343- print (
344- "WARNING: Recommend adding a pfm_title to %s"
345- % subkey .get ("pfm_name" , "<unnamed key>" )
346- )
341+ # TODO: Suggest adding a title if one is missing
342+ # if "pfm_title " not in subkey:
343+ # print(
344+ # "WARNING: Recommend adding a pfm_title to %s"
345+ # % subkey.get("pfm_name", "<unnamed key>")
346+ # )
347347
348348 # Check that list items are of the expected type
349349 if not validate_list_item_types (subkey , filename ):
@@ -393,12 +393,13 @@ def main(argv=None):
393393 except (ExpatError , ValueError ) as err :
394394 print ("{}: plist parsing error: {}" .format (filename , err ))
395395 retval = 1
396+ continue # No need to continue checking this file
396397
397398 # Check for presence of required keys.
398399 required_keys = ("pfm_title" , "pfm_domain" , "pfm_description" )
399400 if not validate_required_keys (manifest , required_keys , "<root dict>" , filename ):
400401 retval = 1
401- break # No need to continue checking this file
402+ continue # No need to continue checking this file
402403
403404 # Ensure pfm_format_version has expected value
404405 if manifest .get ("pfm_format_version" , 1 ) != 1 :
0 commit comments