1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
Fabian Groffen wrote: |
5 |
> On 25-05-2007 15:04:24 +0200, Fabian Groffen wrote: |
6 |
> ... |
7 |
>> raise an exception on the pty code, but only bails out on the |
8 |
>> termios.tcgetattr function because it gets an "invalid argument". |
9 |
> |
10 |
> from the code pym/portage/__init__.py around line 2288 |
11 |
> |
12 |
> from pty import openpty |
13 |
> master_fd, slave_fd = openpty() |
14 |
> # Disable the ECHO attribute so the terminal behaves properly |
15 |
> # if the subprocess needs to read input from stdin. |
16 |
> import termios |
17 |
> term_attr = termios.tcgetattr(master_fd) |
18 |
> term_attr[3] &= ~termios.ECHO |
19 |
> termios.tcsetattr(master_fd, termios.TCSAFLUSH, term_attr) |
20 |
> |
21 |
> if I comment out the complete termios (last four lines) it appears to |
22 |
> work, though I don't know what repercussions this has on the rest of the |
23 |
> code. Judging from the comment, it feels not so right. |
24 |
> |
25 |
|
26 |
Try replacing master_fd with slave_fd in both the tcgetattr and |
27 |
tcsetattr calls. I'm not sure if that will solve it but it's worth |
28 |
a try. |
29 |
|
30 |
Zac |
31 |
-----BEGIN PGP SIGNATURE----- |
32 |
Version: GnuPG v2.0.4 (GNU/Linux) |
33 |
|
34 |
iD8DBQFGVzyJ/ejvha5XGaMRAgSRAJ9ugQK2FX4wKdbMjzUzvbyyjN/fsQCdE+EF |
35 |
lWenpj4ZAfWQ15Pq2pCwLp4= |
36 |
=Rl1X |
37 |
-----END PGP SIGNATURE----- |
38 |
-- |
39 |
gentoo-portage-dev@g.o mailing list |