Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit 29e0c83

Browse files
committed
Merge pull request #15 from maruel/clean
Fix --port_path
2 parents 39dc3fe + 34f41ee commit 29e0c83

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

adb/adb_commands.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def GetState(self):
110110
return self._device_state
111111

112112
def Install(self, apk_path, destination_dir=None, timeout_ms=None):
113-
"""Install apk to device.
113+
"""Install an apk to the device.
114114
115115
Doesn't support verifier file, instead allows destination directory to be
116116
overridden.
@@ -133,10 +133,11 @@ def Install(self, apk_path, destination_dir=None, timeout_ms=None):
133133
timeout_ms=timeout_ms)
134134

135135
def Push(self, source_file, device_filename, mtime='0', timeout_ms=None):
136-
"""Push source_file to file on device.
136+
"""Push a file or directory to the device.
137137
138138
Arguments:
139-
source_file: Either a filename or file-like object to push to the device.
139+
source_file: Either a filename, a directory or file-like object to push to
140+
the device.
140141
device_filename: The filename on the device to write to.
141142
mtime: Optional, modification time to set on the file.
142143
timeout_ms: Expected timeout for any part of the push.
@@ -158,7 +159,7 @@ def Push(self, source_file, device_filename, mtime='0', timeout_ms=None):
158159
connection.Close()
159160

160161
def Pull(self, device_filename, dest_file=None, timeout_ms=None):
161-
"""Pull file from device.
162+
"""Pull a file from the device.
162163
163164
Arguments:
164165
device_filename: The filename on the device to pull.
@@ -198,7 +199,10 @@ def List(self, device_path):
198199
return listing
199200

200201
def Reboot(self, destination=''):
201-
"""Reboot device, specify 'bootloader' for fastboot."""
202+
"""Reboot the device.
203+
204+
Specify 'bootloader' for fastboot.
205+
"""
202206
self.protocol_handler.Open(self.handle, 'reboot:%s' % destination)
203207

204208
def RebootBootloader(self):
@@ -210,7 +214,7 @@ def Remount(self):
210214
return self.protocol_handler.Command(self.handle, service='remount')
211215

212216
def Root(self):
213-
"""Restart adbd as root on device."""
217+
"""Restart adbd as root on the device."""
214218
return self.protocol_handler.Command(self.handle, service='root')
215219

216220
def Shell(self, command, timeout_ms=None):

adb/common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ def BulkRead(self, length, timeout_ms=None):
186186
'Could not receive data from %s (timeout %sms)' % (
187187
self.usb_info, self.Timeout(timeout_ms)), e)
188188

189+
@classmethod
189190
def PortPathMatcher(cls, port_path):
190191
"""Returns a device matcher for the given port path."""
191192
if isinstance(port_path, basestring):

0 commit comments

Comments
 (0)