From ff1b23feab95e4588c134d1c180ae69e14627915 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Tue, 31 May 2011 11:06:55 +0000 Subject: syncdaemon: fix listing xattrs when there is none and failure handling Signed-off-by: Csaba Henk Signed-off-by: Anand Avati BUG: 2859 (gsyncd crashes if master vol root has no xattrs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2859 BUG: 2859 (gsyncd crashes if master vol root has no xattrs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2859 --- xlators/features/marker/utils/syncdaemon/libcxattr.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/xlators/features/marker/utils/syncdaemon/libcxattr.py b/xlators/features/marker/utils/syncdaemon/libcxattr.py index 907a16c7802..fdc016c47ce 100644 --- a/xlators/features/marker/utils/syncdaemon/libcxattr.py +++ b/xlators/features/marker/utils/syncdaemon/libcxattr.py @@ -55,9 +55,8 @@ class Xattr(object): @classmethod def llistxattr_buf(cls, path): size = cls.llistxattr(path) - if size == -1: - raise_oserr() + if size == -1: + cls.raise_oserr() + if size == 0: + return [] return cls.llistxattr(path, size) - - - -- cgit