summaryrefslogtreecommitdiffstats
path: root/pyudev.py
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2010-01-27 07:28:33 -1000
committerDavid Cantrell <dcantrell@redhat.com>2010-01-27 08:28:04 -1000
commit32877ebaceccffe4096c8c25e9a143b8cc81757f (patch)
tree464a0f5dd7f3b37cffcd93af35aa04696fd7cb6f /pyudev.py
parentace9aee03785a022e7a8483386f160f742bd360a (diff)
downloadanaconda-32877ebaceccffe4096c8c25e9a143b8cc81757f.tar.gz
anaconda-32877ebaceccffe4096c8c25e9a143b8cc81757f.tar.xz
anaconda-32877ebaceccffe4096c8c25e9a143b8cc81757f.zip
Make sure we always check /lib64 and /lib in find_library (#555669).
LD_LIBRARY_PATH ended up being /tmp/updates on my test system, so make sure we always check the default library paths in find_library().
Diffstat (limited to 'pyudev.py')
-rw-r--r--pyudev.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pyudev.py b/pyudev.py
index b6e5ea950..58ea074d8 100644
--- a/pyudev.py
+++ b/pyudev.py
@@ -9,11 +9,12 @@ from ctypes import *
# XXX this one may need some tweaking...
def find_library(name, somajor=0):
env = os.environ.get("LD_LIBRARY_PATH")
+ common = ["/lib64", "/lib"]
if env:
- libdirs = env.split(":")
+ libdirs = env.split(":") + common
else:
- libdirs = ["/lib64", "/lib"]
+ libdirs = common
libdirs = filter(os.path.isdir, libdirs)
@@ -29,7 +30,6 @@ def find_library(name, somajor=0):
else:
return None
-
# find the udev library
libudev = find_library(name="udev", somajor=0)