From 48127be997170d5069c9f9431b448790d490bfcd Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 18 Mar 2022 17:17:01 +0100 Subject: 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. --- uinput_mng | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- cgit v1.2.3