Przeglądaj źródła

protect against repeated libraries on command line

David Rose 21 lat temu
rodzic
commit
11e1ff3b81
1 zmienionych plików z 8 dodań i 0 usunięć
  1. 8 0
      direct/src/ffi/DoGenPyCode.py

+ 8 - 0
direct/src/ffi/DoGenPyCode.py

@@ -124,6 +124,14 @@ def doGetopts():
     # Store the program arguments into the codeLibs
     codeLibs += pargs
 
+    # Make sure each name appears on codeLibs exactly once.
+    newLibs = []
+    for codeLib in codeLibs:
+        if codeLib not in newLibs:
+            newLibs.append(codeLib)
+    codeLibs = newLibs
+        
+
 def doErrorCheck():
     global outputDir
     global extensionsDir