2
0
mirror of https://opendev.org/x/pyghmi synced 2025-07-03 11:15:34 +00:00

Stop assuming a return for select

The code no longer uses tmplist for anything.  It has been observed
that select.select may return something other than a 3 member
tuple, so become apathetic about the nature of the return.

The fact this can happen is in all likelihood a bug in the select
implementation, however it's hard to nail down and easy enough
to tolerate.

Change-Id: Ib13a6dcce0809f9c2c4d9f02e19adc9de818f3fb
This commit is contained in:
Jarrod Johnson
2019-12-02 14:50:06 -05:00
parent 2a40dd8cad
commit 3b3204b8bf

View File

@ -107,7 +107,7 @@ def define_worker():
if timeout < 0:
timeout = 0
selectdeadline = _monotonic_time() + timeout
tmplist, _, _ = select.select(iosockets, (), (), timeout)
select.select(iosockets, (), (), timeout)
# pessimistically move out the deadline
# doing it this early (before ioqueue is evaluated)
# this avoids other threads making a bad assumption