mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-30 06:34:13 +00:00 
			
		
		
		
	framework/output: output fixes
- Get events from the result - Correctly handle pending jobs
This commit is contained in:
		
				
					committed by
					
						 Marc Bonnici
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							79aaef9986
						
					
				
				
					commit
					879dfc7700
				
			| @@ -72,15 +72,24 @@ class Output(object): | ||||
|             raise RuntimeError(msg) | ||||
|         self.result.classifiers = value | ||||
|  | ||||
|     @property | ||||
|     def events(self): | ||||
|         if self.result is None: | ||||
|             return [] | ||||
|         return self.result.events | ||||
|  | ||||
|     def __init__(self, path): | ||||
|         self.basepath = path | ||||
|         self.result = None | ||||
|         self.events = [] | ||||
|  | ||||
|     def reload(self): | ||||
|         try: | ||||
|             pod = read_pod(self.resultfile) | ||||
|             self.result = Result.from_pod(pod) | ||||
|             if os.path.isdir(self.basepath): | ||||
|                 pod = read_pod(self.resultfile) | ||||
|                 self.result = Result.from_pod(pod) | ||||
|             else: | ||||
|                 self.result = Result() | ||||
|                 self.result.status = Status.PENDING | ||||
|         except Exception as e: | ||||
|             self.result = Result() | ||||
|             self.result.status = Status.UNKNOWN | ||||
|   | ||||
		Reference in New Issue
	
	Block a user