Skip to content

Commit

Permalink
Warn when 'connect()' fails due to LockNotAcquiredException
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffLIrion committed Dec 18, 2019
1 parent bab3fb3 commit 91823aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions androidtv/adb_manager.py
Expand Up @@ -168,7 +168,7 @@ def connect(self, always_log_errors=True, auth_timeout_s=DEFAULT_AUTH_TIMEOUT_S)
return False

except LockNotAcquiredException:
# ADB connection attempt failed because lock was not acquired
_LOGGER.warning("Couldn't connect to %s:%d because adb-shell lock not acquired.", self.host, self.port)
self.close()
self._available = False
return False
Expand Down Expand Up @@ -367,7 +367,7 @@ def connect(self, always_log_errors=True):
return False

except LockNotAcquiredException:
# ADB connection attempt failed because lock was not acquired
_LOGGER.warning("Couldn't connect to %s:%d via ADB server %s:%d because pure-python-adb lock not acquired.", self.host, self.port, self.adb_server_ip, self.adb_server_port)
self.close()
self._available = False
return False
Expand Down

0 comments on commit 91823aa

Please sign in to comment.