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:
@@ -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:
|
||||
|
||||
@@ -96,7 +96,6 @@ def await_signal(
|
||||
detected_signal = False
|
||||
timeout = int(timeout)
|
||||
loop = GLib.MainLoop()
|
||||
th_sleep = Thread()
|
||||
|
||||
def th_timeout():
|
||||
sleep(timeout)
|
||||
|
||||
Reference in New Issue
Block a user