mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-30 22:54:18 +00:00 
			
		
		
		
	wa/misc: Fix format_duration() to handle missing time
If a run is interrupted this can cause the time to be `None` causing an error, if this is the case then set time to 0 and therefore return `N/A`.
This commit is contained in:
		| @@ -247,7 +247,7 @@ def format_duration(seconds, sep=' ', order=['day', 'hour', 'minute', 'second']) | ||||
|     if isinstance(seconds, timedelta): | ||||
|         td = seconds | ||||
|     else: | ||||
|         td = timedelta(seconds=seconds) | ||||
|         td = timedelta(seconds=seconds or 0) | ||||
|     dt = datetime(1, 1, 1) + td | ||||
|     result = [] | ||||
|     for item in order: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user