Skip to content

Commit 7761bc2

Browse files
committed
Fix traceback if type not in PLIST_TYPES
1 parent 7d3cd42 commit 7761bc2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pre_commit_hooks/check_jamf_json_manifests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ def validate_default(name, property, type_found, filename):
140140
actual_type = str
141141
else:
142142
actual_type = type(property[test_key])
143-
if actual_type != PLIST_TYPES[type_found]:
143+
if actual_type != PLIST_TYPES.get(type_found):
144144
print(
145145
"{}: {} value for {} should be {}, not {}".format(
146146
filename,
147147
test_key,
148148
name,
149-
PLIST_TYPES[type_found],
149+
PLIST_TYPES.get(type_found),
150150
type(property[test_key]),
151151
)
152152
)

0 commit comments

Comments
 (0)