refactor(dbus): Fix typo and remove unused thread instance

Corrected a typo in the `timeout` parameter name in `method_await_reset`
and removed an unused thread instance `th_sleep` from `dbus_helper.py`.
These changes improve code clarity and eliminate redundant components.
This commit is contained in:
2025-04-19 15:05:47 +02:00
parent 7207845b13
commit f8bc1532e3
2 changed files with 3 additions and 3 deletions

View File

@@ -44,10 +44,11 @@ def method_reset():
log.info("ResetDriver called via D-Bus")
def method_await_reset(timout: int = 0):
def method_await_reset(timeout: int = 0):
detected_signal = await_signal(
"NotifyDriverReset",
timout, extend_interface("picontrol"),
timeout,
extend_interface("picontrol"),
bus_type=BusType.SESSION if pi.pargs.use_session_bus else BusType.SYSTEM,
)
if detected_signal:

View File

@@ -96,7 +96,6 @@ def await_signal(
detected_signal = False
timeout = int(timeout)
loop = GLib.MainLoop()
th_sleep = Thread()
def th_timeout():
sleep(timeout)