Parcourir la source

[trac1030] place the added path at the beginning of the list

if in any of the other paths there was an old log.so, it would choose that otherwise
Jelte Jansen il y a 14 ans
Parent
commit
0bea88f134
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/lib/python/isc/log/__init__.py

+ 2 - 2
src/lib/python/isc/log/__init__.py

@@ -28,9 +28,9 @@ import sys
 cwd = os.getcwd()
 base = os.path.split(cwd)[0]
 
-for base in sys.path:
+for base in sys.path[:]:
     loglibdir = os.path.join(base, 'isc/log/.libs')
     if os.path.exists(loglibdir):
-        sys.path.append(loglibdir)
+        sys.path.insert(0, loglibdir)
 
 from log import *