Skip to content

Commit 1f4235c

Browse files
committed
Fix colored output in newline
Fix ts (moreutils) is used the nextline had the color from the previous one
1 parent 751beda commit 1f4235c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/webdevops/doit/DoitReporter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def add_failure(self, task, exception):
138138

139139
if task.actions and (task.name[0] != '_'):
140140
duration = self.duration(self.t_results[task.name].elapsed)
141-
self.write(colored('. %s FAILED (%s)\n' % (BaseTaskLoader.human_task_name(task.title()), duration), 'red'))
141+
self.writeln(colored('. %s FAILED (%s)' % (BaseTaskLoader.human_task_name(task.title()), duration), 'red'))
142142
self.failures.append({'task': task, 'exception': exception})
143143

144144
def add_success(self, task):
@@ -149,7 +149,7 @@ def add_success(self, task):
149149

150150
if task.actions and (task.name[0] != '_'):
151151
duration = self.duration(self.t_results[task.name].elapsed)
152-
self.write(colored('. %s finished (%s)\n' % (BaseTaskLoader.human_task_name(task.title()), duration), 'green'))
152+
self.writeln(colored('. %s finished (%s)' % (BaseTaskLoader.human_task_name(task.title()), duration), 'green'))
153153

154154
def skip_uptodate(self, task):
155155
"""

0 commit comments

Comments
 (0)