diff --git a/lib/logitech/unifying_receiver/listener.py b/lib/logitech/unifying_receiver/listener.py index ddf4515d..6ba0d15d 100644 --- a/lib/logitech/unifying_receiver/listener.py +++ b/lib/logitech/unifying_receiver/listener.py @@ -59,7 +59,8 @@ class _ThreadedHandle(object): handles, self._handles = self._handles, [] if _log.isEnabledFor(_DEBUG): _log.debug("%s closing %s", repr(self), handles) - map(_base.close, handles) + for h in handles: + _base.close(h) @property def notifications_hook(self): diff --git a/lib/solaar/gtk.py b/lib/solaar/gtk.py index f6d35186..80fcd31f 100644 --- a/lib/solaar/gtk.py +++ b/lib/solaar/gtk.py @@ -110,9 +110,11 @@ def _run(args): from gi.repository import Gtk Gtk.main() - map(ReceiverListener.stop, listeners.values()) + for l in listeners.values(): + l.stop() ui.notify.uninit() - map(ReceiverListener.join, listeners.values()) + for l in listeners.values(): + l.join() def main(): diff --git a/lib/solaar/ui/main_window.py b/lib/solaar/ui/main_window.py index b98dc145..5c0402e3 100644 --- a/lib/solaar/ui/main_window.py +++ b/lib/solaar/ui/main_window.py @@ -359,7 +359,7 @@ def toggle_all(status_icon): if not _windows: return - visible = [w.get_visible() for w in _windows.values()] + visible = (w.get_visible() for w in _windows.values()) if all(visible): for w in _windows.values(): _hide(w)