diff options
author | Jeff Darcy <jdarcy@redhat.com> | 2014-04-22 15:37:09 +0000 |
---|---|---|
committer | Jeff Darcy <jdarcy@redhat.com> | 2014-04-22 15:37:09 +0000 |
commit | a827c5eab32a43ade5551259ea56a6a1af7e861b (patch) | |
tree | e6707df68f72baa8645210ba931272285116ad85 /geo-replication/syncdaemon/libgfchangelog.py | |
parent | 46d333783a968ab39e0beade9c7a1eec8035f8b1 (diff) | |
parent | 99bfc2a2a1689da1e173cb2f8ef54d2b09ef3a5d (diff) |
Merge branch 'upstream'
Conflicts:
glusterfs.spec.in
xlators/mgmt/glusterd/src/Makefile.am
xlators/mgmt/glusterd/src/glusterd-utils.c
xlators/mgmt/glusterd/src/glusterd.h
Change-Id: I27bdcf42b003cfc42d6ad981bd2bf8180176806d
Diffstat (limited to 'geo-replication/syncdaemon/libgfchangelog.py')
-rw-r--r-- | geo-replication/syncdaemon/libgfchangelog.py | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/geo-replication/syncdaemon/libgfchangelog.py b/geo-replication/syncdaemon/libgfchangelog.py index 68ec3baf1..ec563b36f 100644 --- a/geo-replication/syncdaemon/libgfchangelog.py +++ b/geo-replication/syncdaemon/libgfchangelog.py @@ -1,7 +1,18 @@ +# +# Copyright (c) 2011-2014 Red Hat, Inc. <http://www.redhat.com> +# This file is part of GlusterFS. + +# This file is licensed to you under your choice of the GNU Lesser +# General Public License, version 3 or any later version (LGPLv3 or +# later), or the GNU General Public License, version 2 (GPLv2), in all +# cases as published by the Free Software Foundation. +# + import os -from ctypes import * +from ctypes import CDLL, create_string_buffer, get_errno from ctypes.util import find_library + class Changes(object): libgfc = CDLL(find_library("gfchangelog"), use_errno=True) @@ -19,9 +30,10 @@ class Changes(object): return getattr(cls.libgfc, call) @classmethod - def cl_register(cls, brick, path, log_file, log_level, retries = 0): + 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) + log_file, + log_level, retries) if ret == -1: cls.raise_oserr() @@ -49,8 +61,8 @@ class Changes(object): while True: ret = call(buf, 4096) if ret in (0, -1): - break; - changes.append(buf.raw[:ret-1]) + break + changes.append(buf.raw[:ret - 1]) if ret == -1: cls.raise_oserr() # cleanup tracker |