Cleanup unused function return values (#72512)

pull/72541/head
Marc Mueller 2022-05-26 13:17:08 +02:00 committed by GitHub
parent e8feecf50b
commit 48cc3638fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 10 deletions

View File

@ -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."""

View File

@ -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