diff --git a/luigi/mock.py b/luigi/mock.py index 5e781f7751..bf158eb011 100644 --- a/luigi/mock.py +++ b/luigi/mock.py @@ -124,15 +124,10 @@ def set_wrapper(self, wrapper): self.wrapper = wrapper def write(self, data): - if six.PY3: - stderrbytes = sys.stderr.buffer - else: - stderrbytes = sys.stderr - if mock_target._mirror_on_stderr: if self._write_line: sys.stderr.write(fn + ": ") - stderrbytes.write(data) + sys.stderr.write(data) if (data[-1]) == '\n': self._write_line = True else: