catch TypeError's in addition to ValueError's for unifi direct device tracker (#19994)
* catch TypeError's in addition to ValueError's in response from unifi access point sometimes unifi's access point returns incomplete json which results in a TypeError because ssid_table is None * fix syntax error
This commit is contained in:
1 parent
418fa226e6
commit
2208563de4
1 file changed
+1
-1
@@ -131,6 +131,6 @@ def _response_to_json(response):
|
||||
active_clients[client.get("mac")] = client
|
||||
|
||||
return active_clients
|
||||
except ValueError:
|
||||
except (ValueError, TypeError):
|
||||
_LOGGER.error("Failed to decode response from AP.")
|
||||
return {}
|
||||
Reference in new issue
Block a user