bpo-18035: telnetlib: select.error doesn't have an errno attribute (#5044)
https://github.com/python/cpython/commit/3ceaed0dce81fd881bbaf2dbdbe827d9681... commit: 3ceaed0dce81fd881bbaf2dbdbe827d9681887da branch: 2.7 author: Segev Finer <segev208@gmail.com> committer: Gregory P. Smith <greg@krypto.org> date: 2017-12-29T12:44:04-08:00 summary: bpo-18035: telnetlib: select.error doesn't have an errno attribute (#5044) select.error doesn't have an errno attribute so access the errno by indexing instead. files: A Misc/NEWS.d/next/Library/2017-12-29-15-16-56.bpo-18035.c6rdCt.rst M Lib/telnetlib.py diff --git a/Lib/telnetlib.py b/Lib/telnetlib.py index 2eaa8e37098..d0246c0aea7 100644 --- a/Lib/telnetlib.py +++ b/Lib/telnetlib.py @@ -317,7 +317,7 @@ def _read_until_with_poll(self, match, timeout): ready = poller.poll(None if timeout is None else 1000 * call_timeout) except select.error as e: - if e.errno == errno.EINTR: + if e[0] == errno.EINTR: if timeout is not None: elapsed = time() - time_start call_timeout = timeout-elapsed @@ -688,7 +688,7 @@ def _expect_with_poll(self, expect_list, timeout=None): ready = poller.poll(None if timeout is None else 1000 * call_timeout) except select.error as e: - if e.errno == errno.EINTR: + if e[0] == errno.EINTR: if timeout is not None: elapsed = time() - time_start call_timeout = timeout-elapsed diff --git a/Misc/NEWS.d/next/Library/2017-12-29-15-16-56.bpo-18035.c6rdCt.rst b/Misc/NEWS.d/next/Library/2017-12-29-15-16-56.bpo-18035.c6rdCt.rst new file mode 100644 index 00000000000..7b6e0dc6b28 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2017-12-29-15-16-56.bpo-18035.c6rdCt.rst @@ -0,0 +1,2 @@ +``telnetlib``: ``select.error`` doesn't have an ``errno`` attribute. Patch +by Segev Finer.
participants (1)
-
Gregory P. Smith