Browse Source

🔨 Fix thread-unsafe deque iteration

Scott Lahteine 1 year ago
parent
commit
c2decc3e2e
1 changed files with 2 additions and 1 deletions
  1. 2 1
      buildroot/share/PlatformIO/scripts/marlin.py

+ 2 - 1
buildroot/share/PlatformIO/scripts/marlin.py

@@ -16,7 +16,8 @@ def copytree(src, dst, symlinks=False, ignore=None):
             shutil.copy2(item, dst / item.name)
 
 def replace_define(field, value):
-    for define in env['CPPDEFINES']:
+    envdefs = env['CPPDEFINES'].copy()
+    for define in envdefs:
         if define[0] == field:
             env['CPPDEFINES'].remove(define)
     env['CPPDEFINES'].append((field, value))