Skip to content

Commit

Permalink
Merge pull request #33 from Legolas-Li/patch-1
Browse files Browse the repository at this point in the history
Update __init__.py
  • Loading branch information
codeskyblue authored Mar 23, 2021
2 parents 7717d72 + d9d3b41 commit 70d9fc5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions adbutils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,15 @@ def shell(self,
command = subprocess.list2cmdline(command)
assert isinstance(command, six.string_types)
c = self._connect()
# when no response in timeout, socket.timeout will raise
c.conn.settimeout(timeout)
try:
c.send_command("host:transport:" + serial)
c.check_okay()
c.send_command("shell:" + command)
c.check_okay()
if stream:
return c

# when no response in timeout, socket.timeout will raise
c.conn.settimeout(timeout)
try:
return c.read_until_close()
except socket.timeout:
Expand Down

0 comments on commit 70d9fc5

Please sign in to comment.