summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2011-05-31 11:06:55 +0000
committerAnand Avati <avati@gluster.com>2011-05-31 10:01:45 -0700
commitff1b23feab95e4588c134d1c180ae69e14627915 (patch)
treedcc045333b4cbfdbe75b5c87e2bc8f86e8e2cd9b /xlators/features
parenta2b30a1848ee69854c1de87cd1e3d1d74e96a964 (diff)
syncdaemon: fix listing xattrs when there is none and failure handling
Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> 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
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/marker/utils/syncdaemon/libcxattr.py9
1 files 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)
-
-
-