Catch 'BrokenPipeError' exceptions for ADB commands (#19011)

This commit is contained in:
Jeff Irion authored and Teemu R committed 2018-12-05 17:04:08 +01:00
1 parent 3627de3e8a
commit 16e25f2039
1 file changed
+4 -4
@@ -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