1 |
Author: zmedico |
2 |
Date: 2008-05-28 01:13:40 +0000 (Wed, 28 May 2008) |
3 |
New Revision: 10461 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/output.py |
7 |
Log: |
8 |
Make set_term_size() handle the CommandNotFound exception if stty |
9 |
is missing for some reason. |
10 |
|
11 |
|
12 |
Modified: main/trunk/pym/portage/output.py |
13 |
=================================================================== |
14 |
--- main/trunk/pym/portage/output.py 2008-05-28 00:37:22 UTC (rev 10460) |
15 |
+++ main/trunk/pym/portage/output.py 2008-05-28 01:13:40 UTC (rev 10461) |
16 |
@@ -13,7 +13,8 @@ |
17 |
import sys |
18 |
from portage.const import COLOR_MAP_FILE |
19 |
from portage.util import writemsg |
20 |
-from portage.exception import PortageException, ParseError, PermissionDenied, FileNotFound |
21 |
+from portage.exception import CommandNotFound, FileNotFound, \ |
22 |
+ ParseError, PermissionDenied, PortageException |
23 |
|
24 |
havecolor=1 |
25 |
dotitles=1 |
26 |
@@ -405,7 +406,10 @@ |
27 |
""" |
28 |
from portage.process import spawn |
29 |
cmd = ["stty", "rows", str(lines), "columns", str(columns)] |
30 |
- spawn(cmd, env=os.environ, fd_pipes={0:fd}) |
31 |
+ try: |
32 |
+ spawn(cmd, env=os.environ, fd_pipes={0:fd}) |
33 |
+ except CommandNotFound: |
34 |
+ writemsg("portage: stty: command not found\n", noiselevel=-1) |
35 |
|
36 |
class EOutput(object): |
37 |
""" |
38 |
|
39 |
-- |
40 |
gentoo-commits@l.g.o mailing list |