cpython: d61e8050b7d7 (original) (raw)
Mercurial > cpython
changeset 87895:d61e8050b7d7 2.7
Fixes Issue #17200: telnetlib's read_until and expect timeout was broken by the fix to Issue #14635 in Python 2.7.4 to be interpreted as milliseconds instead of seconds when the platform supports select.poll (ie: everywhere). It is now treated as seconds once again. [#17200]
Gregory P. Smith greg@krypto.org | |
---|---|
date | Tue, 10 Dec 2013 18:22:03 -0800 |
parents | 5becf8b612ee |
children | aa324af42c0e |
files | Lib/telnetlib.py Misc/NEWS |
diffstat | 2 files changed, 10 insertions(+), 2 deletions(-)[+] [-] Lib/telnetlib.py 7 Misc/NEWS 5 |
line wrap: on
line diff
--- a/Lib/telnetlib.py +++ b/Lib/telnetlib.py @@ -312,7 +312,9 @@ class Telnet: poller.register(self, poll_in_or_priority_flags) while i < 0 and not self.eof: try:
ready = poller.poll(call_timeout)[](#l1.7)
# Poll takes its timeout in milliseconds.[](#l1.8)
ready = poller.poll(None if timeout is None[](#l1.9)
else 1000 * call_timeout)[](#l1.10) except select.error as e:[](#l1.11) if e.errno == errno.EINTR:[](#l1.12) if timeout is not None:[](#l1.13)
@@ -682,7 +684,8 @@ class Telnet: poller.register(self, poll_in_or_priority_flags) while not m and not self.eof: try:
ready = poller.poll(call_timeout)[](#l1.18)
ready = poller.poll(None if timeout is None[](#l1.19)
else 1000 * call_timeout)[](#l1.20) except select.error as e:[](#l1.21) if e.errno == errno.EINTR:[](#l1.22) if timeout is not None:[](#l1.23)
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -17,6 +17,11 @@ Core and Builtins Library ------- +- Issue #17200: telnetlib's read_until and expect timeout was broken by the