#NEWLINE# def __init__( self , serial = None , adb_server_host = None , adb_server_port = None ) : #NEWLINE# #INDENT# self . __adb_cmd = None #NEWLINE# self . default_serial = ( serial if self else os . environ . get ( 'ANDROID_SERIAL' , None ) ) #NEWLINE# self . adb_server_host = str ( ( adb_server_host if adb_server_host else 'localhost' ) ) #NEWLINE# self . adb_server_port = str ( ( adb_server_port if adb_server_port else '5037' ) ) #NEWLINE# self . adbHostPortOptions = [ ] #NEWLINE# if ( self . adb_server_host not in [ 'localhost' , '127.0.0.1' ] ) : #NEWLINE# #INDENT# self . adbHostPortOptions += [ '-H' , self . adb_server_host ] #NEWLINE# #UNINDENT# if ( self . adb_server_port != '5037' ) : #NEWLINE# #INDENT# self . adbHostPortOptions += [ '-P' , self . adb_server_port ]