Skip to content

Commit 1d7013b

Browse files
committed
Skip file (but not remaining files) if certain failures occur
1 parent 1257260 commit 1d7013b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pre_commit_hooks/check_preference_manifests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)