When setting the size of the pty for logging, check if stdout isatty rather than...
authorZac Medico <zmedico@gentoo.org>
Thu, 26 Jul 2007 21:24:43 +0000 (21:24 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 26 Jul 2007 21:24:43 +0000 (21:24 -0000)
svn path=/main/trunk/; revision=7400

pym/portage/__init__.py

index ef437a3dafc90996da70df27bb42ccf33ebd3df8..fff401072bddba206175133053e7748b8d8ece76 100644 (file)
@@ -2392,8 +2392,7 @@ def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, fakero
                master_fd, slave_fd = openpty()
                fd_pipes.setdefault(0, sys.stdin.fileno())
                fd_pipes_orig = fd_pipes.copy()
-               stdin_fd = fd_pipes[0]
-               if os.isatty(stdin_fd):
+               if os.isatty(fd_pipes_orig[1]):
                        from output import get_term_size, set_term_size
                        rows, columns = get_term_size()
                        set_term_size(rows, columns, slave_fd)