Browse Source

protect against repeated libraries on command line

David Rose 21 years ago
parent
commit
11e1ff3b81
1 changed files with 8 additions and 0 deletions
  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
     # Store the program arguments into the codeLibs
     codeLibs += pargs
     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():
 def doErrorCheck():
     global outputDir
     global outputDir
     global extensionsDir
     global extensionsDir