summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2017-05-13 18:54:36 +0200
committerAmar Tumballi <amarts@redhat.com>2018-03-24 05:10:31 +0000
commit0056feaa21489910fa4ef18668602e1f0967ea6c (patch)
tree3094a6498469efbb4a12ddffe3f5c97b086dfcec /geo-replication/syncdaemon
parentaaa4e373f3c7093fa13d0882a034f35aba2761a1 (diff)
python: Remove all uses of find_library. Fixes #1450593
`find_library()` doesn't consider LD_LIBRARY_PATH on Python < 3.6. Change-Id: Iee26085cb5d14061001f19f032c2664d69a378a8 BUG: 1450593 Signed-off-by: Niklas Hambüchen <mail@nh2.me>
Diffstat (limited to 'geo-replication/syncdaemon')
-rw-r--r--geo-replication/syncdaemon/libcxattr.py3
-rw-r--r--geo-replication/syncdaemon/libgfchangelog.py3
2 files changed, 2 insertions, 4 deletions
diff --git a/geo-replication/syncdaemon/libcxattr.py b/geo-replication/syncdaemon/libcxattr.py
index 3671e102c7f..f576648b7a8 100644
--- a/geo-replication/syncdaemon/libcxattr.py
+++ b/geo-replication/syncdaemon/libcxattr.py
@@ -10,7 +10,6 @@
import os
from ctypes import CDLL, create_string_buffer, get_errno
-from ctypes.util import find_library
class Xattr(object):
@@ -25,7 +24,7 @@ class Xattr(object):
sizes we expect
"""
- libc = CDLL(find_library("c"), use_errno=True)
+ libc = CDLL("libc.so.6", use_errno=True)
@classmethod
def geterrno(cls):
diff --git a/geo-replication/syncdaemon/libgfchangelog.py b/geo-replication/syncdaemon/libgfchangelog.py
index 334f5e9eaf2..da12438d069 100644
--- a/geo-replication/syncdaemon/libgfchangelog.py
+++ b/geo-replication/syncdaemon/libgfchangelog.py
@@ -11,12 +11,11 @@
import os
from ctypes import CDLL, RTLD_GLOBAL, create_string_buffer, \
get_errno, byref, c_ulong
-from ctypes.util import find_library
from syncdutils import ChangelogException, ChangelogHistoryNotAvailable
class Changes(object):
- libgfc = CDLL(find_library("gfchangelog"), mode=RTLD_GLOBAL,
+ libgfc = CDLL("libgfchangelog.so", mode=RTLD_GLOBAL,
use_errno=True)
@classmethod