Browse Source

Update main.py

line 31:  newsources[i] = srcdst[0] 
was raising a "list assignment index out of range"

destinations is being used correctly but newsources was referencing a non existent index in a python list
2114L3 8 years ago
parent
commit
f6350350c0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      nodemcu_uploader/main.py

+ 1 - 1
nodemcu_uploader/main.py

@@ -28,7 +28,7 @@ def destination_from_source(sources):
         srcdst = sources[i].split(':')
         if len(srcdst) == 2:
             destinations.append(srcdst[1])
-            newsources[i] = srcdst[0]
+            newsources.append(srcdst[0]) #proper list assignment
         else:
             listing = glob.glob(srcdst[0])
             for filename in listing: