Skip to content
Snippets Groups Projects
Commit d1bda397 authored by Yuya Nishihara's avatar Yuya Nishihara
Browse files

selectors2: backport minimal fix of timeout handling from 2.0.1

The original code would raise TypeError since OSError() doesn't support
keyword arguments.

We can't simply import the selectors 2.0.1, which still spawns "uname -p"
through platform.system(). We could switch to the unreleased version, but
I decided to not right now to minimize the change.
parent d9fc51f7
No related branches found
No related tags found
No related merge requests found
......@@ -708,7 +708,7 @@
if expires is not None:
current_time = monotonic()
if current_time > expires:
raise OSError(errno=errno.ETIMEDOUT)
raise OSError(errno.ETIMEDOUT, 'Connection timed out')
if recalc_timeout:
if "timeout" in kwargs:
kwargs["timeout"] = expires - current_time
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment