From 1f4235c92b052dc48d00a34b3c4b5b7ffffd3451 Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Wed, 14 Dec 2016 20:12:44 +0100 Subject: [PATCH] Fix colored output in newline Fix ts (moreutils) is used the nextline had the color from the previous one --- bin/webdevops/doit/DoitReporter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/webdevops/doit/DoitReporter.py b/bin/webdevops/doit/DoitReporter.py index 7d84da8d3..15f917b37 100644 --- a/bin/webdevops/doit/DoitReporter.py +++ b/bin/webdevops/doit/DoitReporter.py @@ -138,7 +138,7 @@ def add_failure(self, task, exception): if task.actions and (task.name[0] != '_'): duration = self.duration(self.t_results[task.name].elapsed) - self.write(colored('. %s FAILED (%s)\n' % (BaseTaskLoader.human_task_name(task.title()), duration), 'red')) + self.writeln(colored('. %s FAILED (%s)' % (BaseTaskLoader.human_task_name(task.title()), duration), 'red')) self.failures.append({'task': task, 'exception': exception}) def add_success(self, task): @@ -149,7 +149,7 @@ def add_success(self, task): if task.actions and (task.name[0] != '_'): duration = self.duration(self.t_results[task.name].elapsed) - self.write(colored('. %s finished (%s)\n' % (BaseTaskLoader.human_task_name(task.title()), duration), 'green')) + self.writeln(colored('. %s finished (%s)' % (BaseTaskLoader.human_task_name(task.title()), duration), 'green')) def skip_uptodate(self, task): """