mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-11-04 07:51:21 +00: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:
		@@ -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)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user