summaryrefslogtreecommitdiffstats
path: root/pym/portage/process.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/portage/process.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/portage/process.py')
-rw-r--r--pym/portage/process.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage/process.py b/pym/portage/process.py
index f3cec8815..32e60ac50 100644
--- a/pym/portage/process.py
+++ b/pym/portage/process.py
@@ -226,9 +226,9 @@ def spawn(mycommand, env={}, opt_name=None, fd_pipes=None, returnpid=False,
# default to propagating our stdin, stdout and stderr.
if fd_pipes is None:
fd_pipes = {
- 0:sys.stdin.fileno(),
- 1:sys.stdout.fileno(),
- 2:sys.stderr.fileno(),
+ 0:sys.__stdin__.fileno(),
+ 1:sys.__stdout__.fileno(),
+ 2:sys.__stderr__.fileno(),
}
# mypids will hold the pids of all processes created.