From 11e1ff3b814ac420535b8641542602e1337ef9a3 Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 3 Dec 2004 00:58:52 +0000 Subject: [PATCH] protect against repeated libraries on command line --- direct/src/ffi/DoGenPyCode.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/direct/src/ffi/DoGenPyCode.py b/direct/src/ffi/DoGenPyCode.py index 5259c601c2..0ca1391022 100644 --- a/direct/src/ffi/DoGenPyCode.py +++ b/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