Skip to content

Commit f4d4a2d

Browse files
author
Eric Arellano
committed
Actually fix console separator issues
1 parent d0c83aa commit f4d4a2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/python/pants/task/console_task.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def register_options(cls, register):
2929

3030
def __init__(self, *args, **kwargs):
3131
super(ConsoleTask, self).__init__(*args, **kwargs)
32-
self._console_separator = self.get_options().sep.encode('unicode_escape').decode('utf-8')
32+
self._console_separator = self.get_options().sep.encode('ascii').decode('unicode_escape')
3333
if self.get_options().output_file:
3434
try:
3535
self._outstream = safe_open(os.path.abspath(self.get_options().output_file), 'wb')
@@ -55,7 +55,7 @@ def execute(self):
5555
targets = self.context.targets()
5656
for value in self.console_output(targets) or tuple():
5757
self._outstream.write(value.encode('utf-8'))
58-
self._outstream.write(self._console_separator.encode('utf-8'))
58+
self._outstream.write(self._console_separator.encode('ascii'))
5959
finally:
6060
self._outstream.flush()
6161
if self.get_options().output_file:

0 commit comments

Comments
 (0)