Cleanup unused function return values (#72512)
parent
e8feecf50b
commit
48cc3638fa
|
@ -766,14 +766,13 @@ class RpcDeviceWrapper(update_coordinator.DataUpdateCoordinator):
|
|||
self.device.firmware_version,
|
||||
new_version,
|
||||
)
|
||||
result = None
|
||||
try:
|
||||
async with async_timeout.timeout(AIOSHELLY_DEVICE_TIMEOUT_SEC):
|
||||
result = await self.device.trigger_ota_update(beta=beta)
|
||||
await self.device.trigger_ota_update(beta=beta)
|
||||
except (asyncio.TimeoutError, OSError) as err:
|
||||
LOGGER.exception("Error while perform ota update: %s", err)
|
||||
|
||||
LOGGER.debug("Result of OTA update call: %s", result)
|
||||
LOGGER.debug("OTA update call successful")
|
||||
|
||||
async def shutdown(self) -> None:
|
||||
"""Shutdown the wrapper."""
|
||||
|
|
|
@ -1290,11 +1290,8 @@ async def websocket_remove_failed_node(
|
|||
connection.subscriptions[msg["id"]] = async_cleanup
|
||||
msg[DATA_UNSUBSCRIBE] = unsubs = [controller.on("node removed", node_removed)]
|
||||
|
||||
result = await controller.async_remove_failed_node(node.node_id)
|
||||
connection.send_result(
|
||||
msg[ID],
|
||||
result,
|
||||
)
|
||||
await controller.async_remove_failed_node(node.node_id)
|
||||
connection.send_result(msg[ID])
|
||||
|
||||
|
||||
@websocket_api.require_admin
|
||||
|
@ -1469,8 +1466,8 @@ async def websocket_refresh_node_info(
|
|||
node.on("interview failed", forward_event),
|
||||
]
|
||||
|
||||
result = await node.async_refresh_info()
|
||||
connection.send_result(msg[ID], result)
|
||||
await node.async_refresh_info()
|
||||
connection.send_result(msg[ID])
|
||||
|
||||
|
||||
@websocket_api.require_admin
|
||||
|
|
Loading…
Reference in New Issue