public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r15514 - main/trunk/pym/portage/package/ebuild
@ 2010-03-02  9:42 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2010-03-02  9:42 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2010-03-02 09:42:20 +0000 (Tue, 02 Mar 2010)
New Revision: 15514

Modified:
   main/trunk/pym/portage/package/ebuild/_pty.py
Log:
Move imports to top.


Modified: main/trunk/pym/portage/package/ebuild/_pty.py
===================================================================
--- main/trunk/pym/portage/package/ebuild/_pty.py	2010-03-02 05:45:48 UTC (rev 15513)
+++ main/trunk/pym/portage/package/ebuild/_pty.py	2010-03-02 09:42:20 UTC (rev 15514)
@@ -11,6 +11,7 @@
 import termios
 
 from portage import os, _unicode_decode, _unicode_encode
+from portage.output import get_term_size, set_term_size
 from portage.process import spawn_bash
 from portage.util import writemsg
 
@@ -178,9 +179,8 @@
 	if _disable_openpty:
 		master_fd, slave_fd = os.pipe()
 	else:
-		from pty import openpty
 		try:
-			master_fd, slave_fd = openpty()
+			master_fd, slave_fd = pty.openpty()
 			got_pty = True
 		except EnvironmentError as e:
 			_disable_openpty = True
@@ -192,7 +192,6 @@
 	if got_pty:
 		# Disable post-processing of output since otherwise weird
 		# things like \n -> \r\n transformations may occur.
-		import termios
 		mode = termios.tcgetattr(slave_fd)
 		mode[1] &= ~termios.OPOST
 		termios.tcsetattr(slave_fd, termios.TCSANOW, mode)
@@ -200,7 +199,6 @@
 	if got_pty and \
 		copy_term_size is not None and \
 		os.isatty(copy_term_size):
-		from portage.output import get_term_size, set_term_size
 		rows, columns = get_term_size()
 		set_term_size(rows, columns, slave_fd)
 




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-02  9:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-02  9:42 [gentoo-commits] portage r15514 - main/trunk/pym/portage/package/ebuild Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox