Make EOutput.write() use writemsg() for special unicode handling.
authorZac Medico <zmedico@gentoo.org>
Sun, 22 Aug 2010 20:51:35 +0000 (13:51 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 22 Aug 2010 20:51:35 +0000 (13:51 -0700)
pym/portage/output.py

index abe10f5f7eebd154621a6f7b422d58bc6a23f2da..a195db4fcd88572ebf243373985507ab30267f23 100644 (file)
@@ -493,12 +493,7 @@ class EOutput(object):
 
        def _write(self, f, s):
                # avoid potential UnicodeEncodeError
-               s = _unicode_encode(s,
-                       encoding=_encodings['stdio'], errors='backslashreplace')
-               if sys.hexversion >= 0x3000000:
-                       f = f.buffer
-               f.write(s)
-               f.flush()
+               writemsg(s, noiselevel=-1, fd=f)
 
        def __eend(self, caller, errno, msg):
                if errno == 0: