Skip to content

Commit 856a95e

Browse files
author
Developer
committed
Fixed bug in download() that mistakenly compared com_port against entire port records, instead of against just the UID field.
1 parent 77d2dd6 commit 856a95e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

PropellerLoad.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,10 @@ def download(self, action, file_to_load, com_port):
138138
if com_port is not None:
139139
# Determine port type and insert into command
140140
wlports = [wirelessport for wirelessport in self.portRec if wirelessport[prName] != ""]
141-
if com_port in wlports:
141+
wlnames = [names[prUID] for names in wlports]
142+
if com_port in wlnames:
142143
# Found wireless port match
143-
IPAddr = [wirelessport[prIP] for wirelessport in wlports][wlports.index(com_port)]
144+
IPAddr = [ips[prIP] for ips in wlports][wlnames.index(com_port)]
144145
self.logger.debug('Requested port %s is at %s', com_port, IPAddr)
145146
command.extend(["-i"])
146147
command.extend([IPAddr.encode('ascii', 'ignore')])

0 commit comments

Comments
 (0)