From 77cb4022c981c3c6ba96533a55058a643f60d334 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 22 Aug 2012 12:46:04 -0700 Subject: Use sys.__std*.fileno() in case of overrides. This fixes AttributeError exceptions for API consumers that override sys.std* streams pseudo-file objects. --- pym/portage/process.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pym/portage/process.py') 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. -- cgit v1.2.3-1-g7c22