File tree 1 file changed +1
-4
lines changed
1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -90,9 +90,6 @@ def init_target_connection(self, target):
90
90
def _init_android_target (self , target ):
91
91
if target .connection_settings .get ('device' ) is None :
92
92
addr = self ._get_target_ip_address (target )
93
- if sys .version_info [0 ] == 3 :
94
- # Convert bytes to string for Python3 compatibility
95
- addr = addr .decode ("utf-8" )
96
93
target .connection_settings ['device' ] = addr + ':5555'
97
94
98
95
def _init_linux_target (self , target ):
@@ -119,7 +116,7 @@ def _get_target_ip_address(self, target):
119
116
time .sleep (1 )
120
117
try :
121
118
tty .expect (r'inet ([1-9]\d*.\d+.\d+.\d+)' , timeout = 10 )
122
- return tty .match .group (1 )
119
+ return tty .match .group (1 ). decode ( 'utf-8' )
123
120
except pexpect .TIMEOUT :
124
121
pass # We have our own timeout -- see below.
125
122
if (time .time () - wait_start_time ) > self .ready_timeout :
You can’t perform that action at this time.
0 commit comments