mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-30 22:54:18 +00:00 
			
		
		
		
	fw/config: better error when merging augs
If one or more entries for augmentations in configuration contains an invalid value, raise ConfigError with the entry name.
This commit is contained in:
		
				
					committed by
					
						 Marc Bonnici
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							3d7984412a
						
					
				
				
					commit
					72f2f82594
				
			| @@ -221,7 +221,16 @@ def merge_augmentations(raw): | ||||
|     cfg_point = JobSpec.configuration['augmentations'] | ||||
|     names = [cfg_point.name,] + cfg_point.aliases | ||||
|  | ||||
|     entries = [toggle_set(raw.pop(n)) for n in names if n in raw] | ||||
|     entries = [] | ||||
|     for n in names: | ||||
|         if n not in raw: | ||||
|             continue | ||||
|         value = raw.pop(n) | ||||
|         try: | ||||
|             entries.append(toggle_set(value)) | ||||
|         except TypeError as e: | ||||
|             msg = 'Invalid value "{}" for "{}": {}' | ||||
|             raise ConfigError(msg.format(value, n, e)) | ||||
|  | ||||
|     # Make sure none of the specified aliases conflict with each other | ||||
|     to_check = [e for e in entries] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user