1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-06 02:40:50 +01:00

Merge pull request #61 from credp/android_disconnect

android: don't try to disconnect devices which aren't connected
This commit is contained in:
setrofim 2016-10-07 08:24:11 +01:00 committed by GitHub
commit 1cc6ddf140

View File

@ -291,7 +291,7 @@ def adb_disconnect(device):
_check_env() _check_env()
if not device: if not device:
return return
if ":" in device: if ":" in device and device in adb_list_devices():
command = "adb disconnect " + device command = "adb disconnect " + device
logger.debug(command) logger.debug(command)
retval = subprocess.call(command, stdout=open(os.devnull, 'wb'), shell=True) retval = subprocess.call(command, stdout=open(os.devnull, 'wb'), shell=True)