Skip to content

Commit dbbf336

Browse files
Avoid KeyError Exceptions.
Co-Authored-By: theotherjimmy <[email protected]>
1 parent 4af70dc commit dbbf336

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/config/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ def _memory_ordering(memory):
652652
def _get_mem_specs(self, permissions, cmsis_part):
653653
all_matching_memories = {
654654
name: memory for name, memory in cmsis_part['memories'].items()
655-
if all(memory['access'][perm] for perm in permissions)
655+
if all(memory['access'].get(perm) for perm in permissions)
656656
}
657657
if all_matching_memories:
658658
return all_matching_memories

0 commit comments

Comments
 (0)