summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/EbuildMetadataPhase.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-08-22 12:46:04 -0700
committerZac Medico <zmedico@gentoo.org>2012-08-22 12:46:04 -0700
commit77cb4022c981c3c6ba96533a55058a643f60d334 (patch)
treeeb387d63ef2dc7f354fef7cb5f4867f4ddcbcb2f /pym/_emerge/EbuildMetadataPhase.py
parent7a55f93d76bab41f025b77fc4e356d6a5b4b9385 (diff)
downloadportage-77cb4022c981c3c6ba96533a55058a643f60d334.tar.gz
portage-77cb4022c981c3c6ba96533a55058a643f60d334.tar.bz2
portage-77cb4022c981c3c6ba96533a55058a643f60d334.zip
Use sys.__std*.fileno() in case of overrides.
This fixes AttributeError exceptions for API consumers that override sys.std* streams pseudo-file objects.
Diffstat (limited to 'pym/_emerge/EbuildMetadataPhase.py')
-rw-r--r--pym/_emerge/EbuildMetadataPhase.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/pym/_emerge/EbuildMetadataPhase.py b/pym/_emerge/EbuildMetadataPhase.py
index c2d3747f7..d49c51f79 100644
--- a/pym/_emerge/EbuildMetadataPhase.py
+++ b/pym/_emerge/EbuildMetadataPhase.py
@@ -74,15 +74,15 @@ class EbuildMetadataPhase(SubProcess):
null_input = open('/dev/null', 'rb')
fd_pipes.setdefault(0, null_input.fileno())
- fd_pipes.setdefault(1, sys.stdout.fileno())
- fd_pipes.setdefault(2, sys.stderr.fileno())
+ fd_pipes.setdefault(1, sys.__stdout__.fileno())
+ fd_pipes.setdefault(2, sys.__stderr__.fileno())
# flush any pending output
for fd in fd_pipes.values():
- if fd == sys.stdout.fileno():
- sys.stdout.flush()
- if fd == sys.stderr.fileno():
- sys.stderr.flush()
+ if fd == sys.__stdout__.fileno():
+ sys.__stdout__.flush()
+ if fd == sys.__stderr__.fileno():
+ sys.__stderr__.flush()
self._files = self._files_dict()
files = self._files