[Python-checkins] cpython (3.3): Fixes Issue #17200: telnetlib's read_until and expect timeout was broken by the
gregory.p.smith
python-checkins at python.org
Wed Dec 11 03:26:28 CET 2013
http://hg.python.org/cpython/rev/46186736e91c
changeset: 87896:46186736e91c
branch: 3.3
parent: 87893:016c64e66a9e
user: Gregory P. Smith <greg at krypto.org>
date: Tue Dec 10 18:25:21 2013 -0800
summary:
Fixes Issue #17200: telnetlib's read_until and expect timeout was broken by the
fix to Issue #14635 in Python 3.3.0 to be interpreted as milliseconds instead
of seconds when the platform supports select.poll (ie: everywhere). It is now
treated as seconds once again.
files:
Lib/telnetlib.py | 6 ++++--
Misc/NEWS | 5 +++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/Lib/telnetlib.py b/Lib/telnetlib.py
--- a/Lib/telnetlib.py
+++ b/Lib/telnetlib.py
@@ -315,7 +315,8 @@
poller.register(self, poll_in_or_priority_flags)
while i < 0 and not self.eof:
try:
- ready = poller.poll(call_timeout)
+ ready = poller.poll(None if timeout is None
+ else 1000 * call_timeout)
except select.error as e:
if e.errno == errno.EINTR:
if timeout is not None:
@@ -683,7 +684,8 @@
poller.register(self, poll_in_or_priority_flags)
while not m and not self.eof:
try:
- ready = poller.poll(call_timeout)
+ ready = poller.poll(None if timeout is None
+ else 1000 * call_timeout)
except select.error as e:
if e.errno == errno.EINTR:
if timeout is not None:
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -20,6 +20,11 @@
Library
-------
+- Issue #17200: telnetlib's read_until and expect timeout was broken by the
+ fix to Issue #14635 in Python 3.3.0 to be interpreted as milliseconds
+ instead of seconds when the platform supports select.poll (ie: everywhere).
+ It is now treated as seconds once again.
+
- Issue #17429: platform.linux_distribution() now decodes files from the UTF-8
encoding with the surrogateescape error handler, instead of decoding from the
locale encoding in strict mode. It fixes the function on Fedora 19 which is
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list