Catch connection errors that makes tradfri hang in startup (#59368)

This commit is contained in:
jan iversen 2021-11-09 13:00:50 +01:00 committed by GitHub
parent fc58df6df9
commit 06d29040b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 9 deletions

View file

@ -59,7 +59,7 @@ def mock_gateway_fixture():
def mock_api_fixture(mock_gateway):
"""Mock api."""
async def api(command):
async def api(command, timeout=None):
"""Mock api function."""
# Store the data for "real" command objects.
if hasattr(command, "_data") and not isinstance(command, Mock):