From 9d4d7bd74d993118ea48daf3cdd3b6fa0dddc8c9 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Fri, 11 Sep 2015 16:46:06 -0400 Subject: [PATCH] fixed porting bugs in profile_tasks to v2 --- lib/ansible/plugins/callback/profile_tasks.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ansible/plugins/callback/profile_tasks.py b/lib/ansible/plugins/callback/profile_tasks.py index f873b75ead0..28aec1c7df2 100644 --- a/lib/ansible/plugins/callback/profile_tasks.py +++ b/lib/ansible/plugins/callback/profile_tasks.py @@ -53,8 +53,8 @@ def tasktime(): time_current = time.strftime('%A %d %B %Y %H:%M:%S %z') time_elapsed = secondsToStr(time.time() - tn) time_total_elapsed = secondsToStr(time.time() - t0) - display(filled('%s (%s)%s%s' % (time_current, time_elapsed, ' ' * 7, time_total_elapsed))) tn = time.time() + return filled('%s (%s)%s%s' % (time_current, time_elapsed, ' ' * 7, time_total_elapsed)) class CallbackModule(CallbackBase): @@ -77,7 +77,7 @@ class CallbackModule(CallbackBase): """ Logs the start of each task """ - tasktime() + self._display.display(tasktime()) timestamp(self) # Record the start time of the current task @@ -85,11 +85,11 @@ class CallbackModule(CallbackBase): self.stats[self.current] = time.time() def playbook_on_setup(self): - tasktime() + self._display.display(tasktime()) def playbook_on_stats(self, stats): - tasktime() - display(filled("", fchar="=")) + self._display.display(tasktime()) + self._display.display(filled("", fchar="=")) timestamp(self) @@ -105,7 +105,7 @@ class CallbackModule(CallbackBase): # Print the timings for name, elapsed in results: - self.display.display( + self._display.display( "{0:-<70}{1:->9}".format( '{0} '.format(name), ' {0:.02f}s'.format(elapsed),