diff options
Diffstat (limited to 'xlators/features/changelog/lib/examples/python/libgfchangelog.py')
| -rw-r--r-- | xlators/features/changelog/lib/examples/python/libgfchangelog.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xlators/features/changelog/lib/examples/python/libgfchangelog.py b/xlators/features/changelog/lib/examples/python/libgfchangelog.py index 68ec3baf144..2da9f2d2a8c 100644 --- a/xlators/features/changelog/lib/examples/python/libgfchangelog.py +++ b/xlators/features/changelog/lib/examples/python/libgfchangelog.py @@ -3,7 +3,8 @@ from ctypes import * from ctypes.util import find_library class Changes(object): - libgfc = CDLL(find_library("gfchangelog"), use_errno=True) + libgfc = CDLL(find_library("gfchangelog"), mode=RTLD_GLOBAL, + use_errno=True) @classmethod def geterrno(cls): @@ -19,6 +20,12 @@ class Changes(object): return getattr(cls.libgfc, call) @classmethod + def cl_init(cls): + ret = cls._get_api('gf_changelog_init')(None) + if ret == -1: + cls.raise_changelog_err() + + @classmethod def cl_register(cls, brick, path, log_file, log_level, retries = 0): ret = cls._get_api('gf_changelog_register')(brick, path, log_file, log_level, retries) |
