forked from auracaster/bumble_mirror
Merge pull request #50 from google/uael/command-timeout
device: raise a `CommandTimeoutError` error on command timeout
This commit is contained in:
@@ -91,6 +91,10 @@ class TimeoutError(Exception):
|
||||
""" Timeout Error """
|
||||
|
||||
|
||||
class CommandTimeoutError(Exception):
|
||||
""" Command Timeout Error """
|
||||
|
||||
|
||||
class InvalidStateError(Exception):
|
||||
""" Invalid State Error """
|
||||
|
||||
|
||||
@@ -784,6 +784,7 @@ class Device(CompositeEventEmitter):
|
||||
)
|
||||
except asyncio.TimeoutError:
|
||||
logger.warning('!!! Command timed out')
|
||||
raise CommandTimeoutError()
|
||||
|
||||
async def power_on(self):
|
||||
# Reset the controller
|
||||
|
||||
Reference in New Issue
Block a user