mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use a str type instead of unicode when searching for the opening '[' in the network packet. Using unicode seems to work, but it really is a byte.
This commit is contained in:
parent
324ae47a37
commit
49cb868bb3
@ -291,7 +291,7 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
|
|||||||
def _read_string_from_net(self):
|
def _read_string_from_net(self):
|
||||||
data = bytes(0)
|
data = bytes(0)
|
||||||
while True:
|
while True:
|
||||||
dex = data.find('[')
|
dex = data.find(b'[')
|
||||||
if dex >= 0:
|
if dex >= 0:
|
||||||
break
|
break
|
||||||
# recv seems to return a pointer into some internal buffer.
|
# recv seems to return a pointer into some internal buffer.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user