Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r10464 - main/branches/2.1.2/pym
Date: Wed, 28 May 2008 01:36:00
Message-Id: E1K1Aa4-0000LS-J0@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-05-28 01:35:55 +0000 (Wed, 28 May 2008)
3 New Revision: 10464
4
5 Modified:
6 main/branches/2.1.2/pym/output.py
7 Log:
8 Make set_term_size() handle the CommandNotFound exception if stty
9 is missing for some reason. (trunk r10461)
10
11
12 Modified: main/branches/2.1.2/pym/output.py
13 ===================================================================
14 --- main/branches/2.1.2/pym/output.py 2008-05-28 01:30:51 UTC (rev 10463)
15 +++ main/branches/2.1.2/pym/output.py 2008-05-28 01:35:55 UTC (rev 10464)
16 @@ -7,7 +7,8 @@
17 import commands,errno,os,re,shlex,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 @@ -347,7 +348,10 @@
27 """
28 from portage_exec 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:
37 """
38
39 --
40 gentoo-commits@l.g.o mailing list