Skip to content

Commit 7f0ed18

Browse files
committed
Fixed issue on addressing in Python 3.8
1 parent 22d98dc commit 7f0ed18

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tobiiglassesctrl/controller.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,10 @@ def __discover_device__(self):
147147
jdata = json.loads(data.decode('utf-8'))
148148
logging.debug("From: " + address[0] + " " + str(data))
149149
logging.debug("Tobii Pro Glasses found with address: [%s]" % address[0])
150-
return (jdata, address[0])
150+
addr = address[0]
151+
if sys.version_info.major == 3 and sys.version_info.minor >= 8:
152+
addr = address[0] + '%' + if_name
153+
return (jdata, addr)
151154
except:
152155
logging.debug("No device found on interface %s" % if_name)
153156

0 commit comments

Comments
 (0)