aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-03-18 17:17:01 +0100
committerAnton Khirnov <anton@khirnov.net>2022-03-18 17:17:01 +0100
commit48127be997170d5069c9f9431b448790d490bfcd (patch)
treeb923e3265fe332d272367c05dd6c721c04eb0874
parent54a8dfeb75c5f3e667f575efb2b50245bb1dee34 (diff)
uinput_mng: compare SelectorKey.data to None rather than bool
PhysDevices is a subclass of dict and so will evaluate as false when no devices are bound.
-rwxr-xr-xuinput_mng2
1 files changed, 1 insertions, 1 deletions
diff --git a/uinput_mng b/uinput_mng
index da71dc0..40cb258 100755
--- a/uinput_mng
+++ b/uinput_mng
@@ -333,7 +333,7 @@ with contextlib.ExitStack() as stack:
events = sel.select()
logger.debug('got events:')
for key, mask in events:
- tgt = key.data if key.data else key.fileobj
+ tgt = key.data if key.data is not None else key.fileobj
try:
tgt.process(key)
except Exception as e: