Commit 3ceaed0d authored by Segev Finer's avatar Segev Finer Committed by Gregory P. Smith

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.
parent 1f9d549a
......@@ -317,7 +317,7 @@ class Telnet:
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 @@ class Telnet:
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
......
``telnetlib``: ``select.error`` doesn't have an ``errno`` attribute. Patch
by Segev Finer.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment