mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-11-04 00:52:08 +00:00 
			
		
		
		
	utils/types: When creating an enum also try to deserialize from POD
Allows for recreating an Enum from a full string representation of the Enum rather than just the name of the Enum.
This commit is contained in:
		@@ -635,7 +635,10 @@ def enum(args, start=0, step=1):
 | 
			
		||||
                if name == attr:
 | 
			
		||||
                    return attr
 | 
			
		||||
 | 
			
		||||
            raise ValueError('Invalid enum value: {}'.format(repr(name)))
 | 
			
		||||
            try:
 | 
			
		||||
                return Enum.from_pod(name)
 | 
			
		||||
            except ValueError:
 | 
			
		||||
                raise ValueError('Invalid enum value: {}'.format(repr(name)))
 | 
			
		||||
 | 
			
		||||
    reserved = ['values', 'levels', 'names']
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user