Merge pull request #584 from antmicro/fix-overrides

Fix stage value overrides
This commit is contained in:
Tomasz Michalak 2022-07-21 14:33:04 +02:00 committed by GitHub
commit 39da9c9f17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 5 deletions

View File

@ -129,12 +129,17 @@ class ProjectFlowConfig:
return _get_ovs_raw('values', self.flow_cfg, part, stage)
def get_stage_value_overrides(self, part: str, stage: str):
stage_vals_ovds = {}
vals = self.flow_cfg.get('values')
if vals is not None:
stage_vals_ovds.update(vals)
stage_cfg = self.flow_cfg[part].get(stage)
if stage_cfg is None:
return {}
stage_vals_ovds = stage_cfg.get('values')
if stage_vals_ovds is None:
return {}
if stage_cfg is not None:
vals = stage_cfg.get('values')
if vals is not None:
stage_vals_ovds.update(vals)
return stage_vals_ovds
def get_dependency_platform_overrides(self, part: str):