Skip to content

Commit 6f39d5a

Browse files
committed
Error check existence of sectors
1 parent 41dac7a commit 6f39d5a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/config/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,10 @@ def sectors(self):
507507
"targets.json `device_name` not found in "
508508
"arm_pack_manager index.")
509509
cmsis_part = cache.index[self.target.device_name]
510-
return cmsis_part['sectors']
510+
sectors = cmsis_part['sectors']
511+
if sectors:
512+
return sectors
513+
raise ConfigException("No sector info available")
511514

512515
@property
513516
def regions(self):

0 commit comments

Comments
 (0)