re: [DIFF] Fix net.py curses resize xterm
"Rob Cakebread" <[email protected]> Sun, 28 May 2006 15:44:00 -0700
| Newsgroups | gmane.comp.games.mud.client.lyntin |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_92_8950858.1148856240762
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Ok heres a patch that doesn't have the good stuff commented out, sorry:
--- net.py.orig 2004-07-25 08:53:35.000000000 -0700
+++ net.py 2006-05-28 15:31:04.000000000 -0700
@@ -107,7 +107,7 @@
data - the telnet option itself
"""
-import socket, select, re, os
+import socket, select, re, os, errno
from lyntin import event, config, exported
from lyntin.ui import message
@@ -325,7 +325,13 @@
"""
Polls the socket for data.
"""
+ try:
readers, e, w =3D select.select([self._sock], [], [], .2)
+ except select.error, (nr, msg):
+ if nr =3D=3D errno.EINTR:
+ readers =3D None
+ else:
+ raise
if readers:
return readers[0].recv(1024)
------=_Part_92_8950858.1148856240762
Content-Type: application/octet-stream; name=net.py.patch
Content-Transfer-Encoding: 7bit
X-Attachment-Id: f_enrzdl32
Content-Disposition: attachment; filename="net.py.patch"
--- net.py.orig 2004-07-25 08:53:35.000000000 -0700
+++ net.py 2006-05-28 15:31:04.000000000 -0700
@@ -107,7 +107,7 @@
data - the telnet option itself
"""
-import socket, select, re, os
+import socket, select, re, os, errno
from lyntin import event, config, exported
from lyntin.ui import message
@@ -325,7 +325,13 @@
"""
Polls the socket for data.
"""
+ try:
readers, e, w = select.select([self._sock], [], [], .2)
+ except select.error, (nr, msg):
+ if nr == errno.EINTR:
+ readers = None
+ else:
+ raise
if readers:
return readers[0].recv(1024)
------=_Part_92_8950858.1148856240762--
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642