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:
Charles Haley 2012-07-31 15:25:46 +02:00
parent 324ae47a37
commit 49cb868bb3

View File

@ -291,7 +291,7 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
def _read_string_from_net(self):
data = bytes(0)
while True:
dex = data.find('[')
dex = data.find(b'[')
if dex >= 0:
break
# recv seems to return a pointer into some internal buffer.