mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-11-03 08:32:07 +00:00 
			
		
		
		
	fw/configuration: Allow for numerical ids to be used
Previously WA would fail if a purely numerical id was used, now explicitly convert the id to a string before use.
This commit is contained in:
		@@ -869,7 +869,7 @@ class JobSpec(Configuration):
 | 
			
		||||
        self.runtime_parameters = target_manager.merge_runtime_parameters(runtime_parameters)
 | 
			
		||||
 | 
			
		||||
    def finalize(self):
 | 
			
		||||
        self.id = "-".join([source.config['id']
 | 
			
		||||
        self.id = "-".join([str(source.config['id'])
 | 
			
		||||
                            for source in self._sources[1:]])  # ignore first id, "global"
 | 
			
		||||
 | 
			
		||||
        # ensure *_parameters are always obj_dict's
 | 
			
		||||
 
 | 
			
		||||
@@ -322,6 +322,7 @@ def _construct_valid_entry(raw, seen_ids, prefix, jobs_config):
 | 
			
		||||
def _collect_valid_id(entry_id, seen_ids, entry_type):
 | 
			
		||||
    if entry_id is None:
 | 
			
		||||
        return
 | 
			
		||||
    entry_id = str(entry_id)
 | 
			
		||||
    if entry_id in seen_ids:
 | 
			
		||||
        raise ConfigError('Duplicate {} ID "{}".'.format(entry_type, entry_id))
 | 
			
		||||
    # "-" is reserved for joining section and workload IDs
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user