1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 02:00:45 +00:00

utils/android: Add debug log about connection settings

While we are there, also fix a trivial pylint issue regarding string
format.

Signed-off-by: Metin Kaya <metin.kaya@arm.com>
This commit is contained in:
Metin Kaya 2024-02-05 10:11:35 +00:00 committed by Marc Bonnici
parent a83fe52382
commit 39dfa7ef72

View File

@ -294,6 +294,10 @@ class AdbConnection(ConnectionBase):
total_transfer_timeout=total_transfer_timeout,
transfer_poll_period=transfer_poll_period,
)
self.logger.debug('server=%s port=%s device=%s as_root=%s',
adb_server, adb_port, device, adb_as_root)
self.timeout = timeout if timeout is not None else self.default_timeout
if device is None:
device = adb_get_device(timeout=timeout, adb_server=adb_server, adb_port=adb_port)
@ -545,9 +549,9 @@ def adb_connect(device, timeout=None, attempts=MAX_ATTEMPTS, adb_server=None, ad
break
time.sleep(10)
else: # did not connect to the device
message = 'Could not connect to {}'.format(device or 'a device')
message = f'Could not connect to {device or "a device"} at {adb_server}:{adb_port}'
if output:
message += '; got: "{}"'.format(output)
message += f'; got: {output}'
raise HostError(message)