From 3b3204b8bf0ff3ecd4e01441ff84ed1d29ee9d31 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 2 Dec 2019 14:50:06 -0500 Subject: [PATCH] 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 --- pyghmi/ipmi/private/session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyghmi/ipmi/private/session.py b/pyghmi/ipmi/private/session.py index 6520cce6..97d195f5 100644 --- a/pyghmi/ipmi/private/session.py +++ b/pyghmi/ipmi/private/session.py @@ -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