diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-03-18 17:17:01 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-03-18 17:17:01 +0100 |
commit | 48127be997170d5069c9f9431b448790d490bfcd (patch) | |
tree | b923e3265fe332d272367c05dd6c721c04eb0874 | |
parent | 54a8dfeb75c5f3e667f575efb2b50245bb1dee34 (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-x | uinput_mng | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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: |