mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Catch 'BrokenPipeError' exceptions for ADB commands (#19011)
This commit is contained in:
parent
3627de3e8a
commit
16e25f2039
@ -125,7 +125,7 @@ class FireTVDevice(MediaPlayerDevice):
|
|||||||
def __init__(self, ftv, name, get_source, get_sources):
|
def __init__(self, ftv, name, get_source, get_sources):
|
||||||
"""Initialize the FireTV device."""
|
"""Initialize the FireTV device."""
|
||||||
from adb.adb_protocol import (
|
from adb.adb_protocol import (
|
||||||
InvalidCommandError, InvalidResponseError, InvalidChecksumError)
|
InvalidChecksumError, InvalidCommandError, InvalidResponseError)
|
||||||
|
|
||||||
self.firetv = ftv
|
self.firetv = ftv
|
||||||
|
|
||||||
@ -137,9 +137,9 @@ class FireTVDevice(MediaPlayerDevice):
|
|||||||
self.adb_lock = threading.Lock()
|
self.adb_lock = threading.Lock()
|
||||||
|
|
||||||
# ADB exceptions to catch
|
# ADB exceptions to catch
|
||||||
self.exceptions = (TypeError, ValueError, AttributeError,
|
self.exceptions = (AttributeError, BrokenPipeError, TypeError,
|
||||||
InvalidCommandError, InvalidResponseError,
|
ValueError, InvalidChecksumError,
|
||||||
InvalidChecksumError)
|
InvalidCommandError, InvalidResponseError)
|
||||||
|
|
||||||
self._state = None
|
self._state = None
|
||||||
self._available = self.firetv.available
|
self._available = self.firetv.available
|
||||||
|
Loading…
x
Reference in New Issue
Block a user