Skip to content

Commit

Permalink
Equilize exception handle in Cloud (#32)
Browse files Browse the repository at this point in the history
For some reason the exceptions expected were diferent in
`list_appliances` and `get_device_info`.
  • Loading branch information
rokam authored May 28, 2024
1 parent 2e3ddb2 commit 26f1efa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion midealocal/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ async def get_device_info(self, device_id: str) -> dict[str, Any] | None:
):
try:
model_number = int(response.get("modelNumber", 0))
except ValueError:
except (ValueError, TypeError):
model_number = 0
model_type = response.get("type")
device_info = {
Expand Down

0 comments on commit 26f1efa

Please sign in to comment.