projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb828d0
)
get_term_size: pass fd to stty
author
Zac Medico
<zmedico@gentoo.org>
Fri, 27 Jul 2012 22:40:16 +0000
(15:40 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Fri, 27 Jul 2012 22:40:16 +0000
(15:40 -0700)
pym/portage/output.py
patch
|
blob
|
history
diff --git
a/pym/portage/output.py
b/pym/portage/output.py
index 4642a285aebf7795f0438117314f75387e8d6828..5129db77ef4fa270272c0abc5375ecc6012313d4 100644
(file)
--- a/
pym/portage/output.py
+++ b/
pym/portage/output.py
@@
-7,6
+7,7
@@
import errno
import io
import formatter
import re
+import subprocess
import sys
import portage
@@
-448,8
+449,11
@@
def get_term_size(fd=None):
pass
except ImportError:
pass
- st, out = portage.subprocess_getstatusoutput('stty size')
- if st == os.EX_OK:
+
+ proc = subprocess.Popen(["stty", "size"],
+ stdout=subprocess.PIPE, stderr=fd)
+ out = _unicode_decode(proc.communicate()[0])
+ if proc.wait() == os.EX_OK:
out = out.split()
if len(out) == 2:
try: