Handle connection errors when connecting to Apple TVs (#5829)
* Handle connection errors when connecting to Apple TVs Also bump pyatv to 0.1.2 which fixes a request leak. * Fix pylint error * Fix import orderpull/5836/head
parent
c54517de90
commit
ecbbb06b2f
|
@ -8,6 +8,7 @@ import asyncio
|
|||
import logging
|
||||
import hashlib
|
||||
|
||||
import aiohttp
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.media_player import (
|
||||
|
@ -21,7 +22,7 @@ import homeassistant.helpers.config_validation as cv
|
|||
import homeassistant.util.dt as dt_util
|
||||
|
||||
|
||||
REQUIREMENTS = ['pyatv==0.1.1']
|
||||
REQUIREMENTS = ['pyatv==0.1.2']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -128,6 +129,8 @@ class AppleTvDevice(MediaPlayerDevice):
|
|||
self._playing = playing
|
||||
except exceptions.AuthenticationError as ex:
|
||||
_LOGGER.warning('%s (bad login id?)', str(ex))
|
||||
except aiohttp.errors.ClientOSError as ex:
|
||||
_LOGGER.error('failed to connect to Apple TV (%s)', str(ex))
|
||||
except asyncio.TimeoutError:
|
||||
_LOGGER.warning('timed out while connecting to Apple TV')
|
||||
|
||||
|
|
|
@ -418,7 +418,7 @@ pyasn1-modules==0.0.8
|
|||
pyasn1==0.2.2
|
||||
|
||||
# homeassistant.components.media_player.apple_tv
|
||||
pyatv==0.1.1
|
||||
pyatv==0.1.2
|
||||
|
||||
# homeassistant.components.device_tracker.bbox
|
||||
# homeassistant.components.sensor.bbox
|
||||
|
|
Loading…
Reference in New Issue