summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2013-12-11 02:25:21 (GMT)
committerGregory P. Smith <greg@krypto.org>2013-12-11 02:25:21 (GMT)
commitacd17304d290bd0b2ad41e5922f81679fea3ab6e (patch)
tree7cfa4986ab0914993ac1fd2d9288e523bb30df35 /Lib
parentf3c6589ea3890d10d6774ec7699a419313a6fb0f (diff)
downloadcpython-acd17304d290bd0b2ad41e5922f81679fea3ab6e.zip
cpython-acd17304d290bd0b2ad41e5922f81679fea3ab6e.tar.gz
cpython-acd17304d290bd0b2ad41e5922f81679fea3ab6e.tar.bz2
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.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/telnetlib.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/telnetlib.py b/Lib/telnetlib.py
index 14ca1b1..d49d4f4 100644
--- a/Lib/telnetlib.py
+++ b/Lib/telnetlib.py
@@ -315,7 +315,8 @@ class Telnet:
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 @@ class Telnet:
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: