Fix execution report printing
* Shortened a task error string because sometimes it breaks the layout * Handled a case when a task/action is in error state but doesn't have a state info Change-Id: I2903806200c8430b497ceb01568f7aa2c55c4e3e
This commit is contained in:
		| @@ -390,7 +390,9 @@ class GetReport(command.Command): | |||||||
|  |  | ||||||
|         if t_ex['state'] == 'ERROR': |         if t_ex['state'] == 'ERROR': | ||||||
|             state_info = t_ex['state_info'] |             state_info = t_ex['state_info'] | ||||||
|             state_info = state_info[0:200] + '...' |  | ||||||
|  |             if state_info: | ||||||
|  |                 state_info = state_info[0:100].replace('\n', ' ') + '...' | ||||||
|  |  | ||||||
|                 self.print_line('(error info: %s)' % state_info, level) |                 self.print_line('(error info: %s)' % state_info, level) | ||||||
|  |  | ||||||
| @@ -409,6 +411,14 @@ class GetReport(command.Command): | |||||||
|             level |             level | ||||||
|         ) |         ) | ||||||
|  |  | ||||||
|  |         if a_ex['state'] == 'ERROR': | ||||||
|  |             state_info = a_ex['state_info'] | ||||||
|  |  | ||||||
|  |             if state_info: | ||||||
|  |                 state_info = state_info[0:100] + '...' | ||||||
|  |  | ||||||
|  |                 self.print_line('(error info: %s)' % state_info, level) | ||||||
|  |  | ||||||
|     def print_statistics(self, stat): |     def print_statistics(self, stat): | ||||||
|         self.print_line( |         self.print_line( | ||||||
|             'Number of tasks in SUCCESS state: %s' % |             'Number of tasks in SUCCESS state: %s' % | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Renat Akhmerov
					Renat Akhmerov