From 47cfc7e3724db152bc2a8d6a4cb9668ed31a3a03 Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Sat, 20 Jun 2026 08:11:32 -0400 Subject: [PATCH] cli: close devices before shutdown in show --- lib/solaar/cli/show.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/solaar/cli/show.py b/lib/solaar/cli/show.py index e6d7a242..0f41b3f1 100644 --- a/lib/solaar/cli/show.py +++ b/lib/solaar/cli/show.py @@ -26,6 +26,7 @@ from logitech_receiver.common import LOGITECH_VENDOR_ID from logitech_receiver.common import NamedInt from logitech_receiver.common import strhex from logitech_receiver.device import CenturionReceiver +from logitech_receiver.device import Device from logitech_receiver.hidpp20_constants import SupportedFeature from solaar import NAME @@ -484,6 +485,8 @@ def run(devices, args, find_receiver, find_device): else: _print_device(d) print("") + for d in Device.instances: + d.close() return dev = find_receiver(devices, device_name) @@ -496,3 +499,4 @@ def run(devices, args, find_receiver, find_device): raise Exception(f"no device found matching '{device_name}'") _print_device(dev) + dev.close()