diff --git a/CONTRIBUTORS b/CONTRIBUTORS index ddb520b..f3fd05b 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -7,4 +7,4 @@ Max Borghino Mohammad Abu-Garbeyyeh Josip Delic Greg E. - +Yongguang Lin diff --git a/adb/adb_commands.py b/adb/adb_commands.py index 9d107d9..411e49d 100644 --- a/adb/adb_commands.py +++ b/adb/adb_commands.py @@ -127,7 +127,7 @@ def ConnectDevice(self, port_path=None, serial=None, default_timeout_ms=None, ** # If there isnt a handle override (used by tests), build one here if 'handle' in kwargs: self._handle = kwargs.pop('handle') - elif serial and b':' in serial: + elif serial and ':' in serial: self._handle = common.TcpHandle(serial, timeout_ms=default_timeout_ms) else: self._handle = common.UsbHandle.FindAndOpen( diff --git a/adb/common.py b/adb/common.py index a68414f..1e31351 100644 --- a/adb/common.py +++ b/adb/common.py @@ -298,8 +298,8 @@ def __init__(self, serial, timeout_ms=None): Host may be an IP address or a host name. """ - if b':' in serial: - (host, port) = serial.split(b':') + if ':' in serial: + (host, port) = serial.split(':') else: host = serial port = 5555 diff --git a/adb/sign_pythonrsa.py b/adb/sign_pythonrsa.py index bc6a221..a401a4c 100644 --- a/adb/sign_pythonrsa.py +++ b/adb/sign_pythonrsa.py @@ -24,7 +24,7 @@ # hashing algo for this. class _Accum(object): def __init__(self): - self._buf = '' + self._buf = b'' def update(self, msg): self._buf += msg