Skip to content

Commit 78bd4b1

Browse files
author
Developer
committed
More fixed that don't work.
1 parent 055bf4e commit 78bd4b1

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

PropellerLoad.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,15 @@ def download(self, action, file_to_load, com_port):
101101
targetWiFi = [l for l in self.wports if isWiFiName(l, com_port)]
102102
if len(targetWiFi) == 1:
103103
self.logger.debug('Requested port %s is at %s', com_port, getWiFiIP(targetWiFi[0]))
104-
command += ["-i", getWiFiIP(targetWiFi[0]).encode('ascii', 'ignore')]
104+
command.extend(["-i"])
105+
command.extend([getWiFiIP(targetWiFi[0]).encode('ascii', 'ignore')])
105106
else:
106107
self.logger.debug('Requested port is %s', com_port)
107-
command += ["-p", com_port.encode('ascii', 'ignore')]
108+
command.extend(["-p"])
109+
command.extend([com_port.encode('ascii', 'ignore')])
108110

109111
# Add target file
110-
command += [file_to_load.name.encode('ascii', 'ignore').replace('\\', '/')]
112+
command.extend([file_to_load.name.encode('ascii', 'ignore').replace('\\', '/')])
111113

112114
# Download
113115
success, out, err = loader(self, command)
@@ -124,9 +126,9 @@ def loader(self, cmdOptions):
124126
if platform.system() == "Windows":
125127
startupinfo = subprocess.STARTUPINFO()
126128
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
127-
process = subprocess.Popen([self.appdir + self.loaderExe[platform.system()], [cmdOptions]], stdout=subprocess.PIPE, stderr=subprocess.PIPE, startupinfo=startupinfo)
129+
process = subprocess.Popen([self.appdir + self.loaderExe[platform.system()], cmdOptions], stdout=subprocess.PIPE, stderr=subprocess.PIPE, startupinfo=startupinfo)
128130
else:
129-
process = subprocess.Popen([self.appdir + self.loaderExe[platform.system()], [cmdOptions]], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
131+
process = subprocess.Popen([self.appdir + self.loaderExe[platform.system()], cmdOptions], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
130132

131133
out, err = process.communicate()
132134

0 commit comments

Comments
 (0)