Error check existence of sectors

pull/5818/head
sarahmarshy 2018-01-11 14:43:18 -06:00
parent 41dac7a34a
commit 6f39d5a063
1 changed files with 4 additions and 1 deletions

View File

@ -507,7 +507,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):