From: Gregory P. Smith Date: Wed, 11 Dec 2013 02:25:21 +0000 (-0800) Subject: Fixes Issue #17200: telnetlib's read_until and expect timeout was broken by the X-Git-Tag: v3.4.0b2~259^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=acd17304d290bd0b2ad41e5922f81679fea3ab6e;p=python 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. --- diff --git a/Lib/telnetlib.py b/Lib/telnetlib.py index 14ca1b1904..d49d4f41af 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: diff --git a/Misc/NEWS b/Misc/NEWS index 5a94af3836..b6837f7dc5 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -20,6 +20,11 @@ Core and Builtins 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