Error check existence of sectors

pull/6056/head
sarahmarshy 2018-01-11 14:43:18 -06:00 committed by adbridge
parent 6df1256213
commit dcaeae80c1
1 changed files with 4 additions and 1 deletions

View File

@ -501,7 +501,10 @@ class Config(object):
"targets.json `device_name` not found in "
"arm_pack_manager index.")
cmsis_part = cache.index[self.target.device_name]
return cmsis_part['sectors']
sectors = cmsis_part['sectors']
if sectors:
return sectors
raise ConfigException("No sector info available")
@property
def regions(self):