mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-29 22:24:51 +00:00 
			
		
		
		
	fw/plugin: implement __str__ for Plugin
Implement __str__ for Plugin in order to provide more readable representations in logging.
This commit is contained in:
		
				
					committed by
					
						 Marc Bonnici
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							2c28d5b214
						
					
				
				
					commit
					b41c3a3ea2
				
			| @@ -361,6 +361,16 @@ class Plugin(object): | ||||
|                 self.capabilities.append(capability) | ||||
|         self._modules.append(module) | ||||
|  | ||||
|     def __str__(self): | ||||
|         return self.name | ||||
|  | ||||
|     def __repr__(self): | ||||
|         params = [] | ||||
|         for param in self.parameters: | ||||
|             params.append('{}={}'.format(param.name, | ||||
|                                          getattr(self, param.name, None))) | ||||
|         return '{}({})'.format(self.name, ', '.join(params)) | ||||
|  | ||||
|  | ||||
| class TargetedPlugin(Plugin): | ||||
|     """ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user