mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +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):
|
||||
"""Initialize the FireTV device."""
|
||||
from adb.adb_protocol import (
|
||||
InvalidCommandError, InvalidResponseError, InvalidChecksumError)
|
||||
InvalidChecksumError, InvalidCommandError, InvalidResponseError)
|
||||
|
||||
self.firetv = ftv
|
||||
|
||||
@ -137,9 +137,9 @@ class FireTVDevice(MediaPlayerDevice):
|
||||
self.adb_lock = threading.Lock()
|
||||
|
||||
# ADB exceptions to catch
|
||||
self.exceptions = (TypeError, ValueError, AttributeError,
|
||||
InvalidCommandError, InvalidResponseError,
|
||||
InvalidChecksumError)
|
||||
self.exceptions = (AttributeError, BrokenPipeError, TypeError,
|
||||
ValueError, InvalidChecksumError,
|
||||
InvalidCommandError, InvalidResponseError)
|
||||
|
||||
self._state = None
|
||||
self._available = self.firetv.available
|
||||
|
Loading…
x
Reference in New Issue
Block a user