summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2011-04-29 12:25:36 +0000
committerAnand Avati <avati@gluster.com>2011-05-09 13:27:06 -0700
commit0652f9f92123e8bb3c0fee02c9fb3bbe23d9f7c6 (patch)
tree373efa4479e969ce5e3cd0bd8ba126435cd4bfdc
parent6f2ed82bfcfe494ef273bff55cf69480a7472cc5 (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
-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)
-
-
-