projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1fb22f0
)
Fix writemsg to only use fd.buffer when it is stderr or stdout.
author
Zac Medico
<zmedico@gentoo.org>
Mon, 12 Jul 2010 10:49:13 +0000
(
03:49
-0700)
committer
Zac Medico
<zmedico@gentoo.org>
Mon, 12 Jul 2010 10:49:13 +0000
(
03:49
-0700)
pym/portage/util/__init__.py
patch
|
blob
|
history
diff --git
a/pym/portage/util/__init__.py
b/pym/portage/util/__init__.py
index 3c552025b558cbab1cc3bca8acffd5e0beef5b11..821428d1260e3b2aa6ee51a7a556b503e6241be3 100644
(file)
--- a/
pym/portage/util/__init__.py
+++ b/
pym/portage/util/__init__.py
@@
-58,7
+58,7
@@
def writemsg(mystr,noiselevel=0,fd=None):
# avoid potential UnicodeEncodeError
mystr = _unicode_encode(mystr,
encoding=_encodings['stdio'], errors='backslashreplace')
- if sys.hexversion >= 0x3000000:
+ if sys.hexversion >= 0x3000000
and fd in (sys.stdout, sys.stderr)
:
fd = fd.buffer
fd.write(mystr)
fd.flush()