summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster
diff options
context:
space:
mode:
Diffstat (limited to 'glustolibs-gluster/glustolibs/gluster')
-rwxr-xr-xglustolibs-gluster/glustolibs/gluster/glusterfile.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/glusterfile.py b/glustolibs-gluster/glustolibs/gluster/glusterfile.py
index 7cb961c..32068d9 100755
--- a/glustolibs-gluster/glustolibs/gluster/glusterfile.py
+++ b/glustolibs-gluster/glustolibs/gluster/glusterfile.py
@@ -108,12 +108,13 @@ def get_fattr(host, fqpath, fattr):
Returns:
getfattr result on success. None on fail.
"""
- command = ("getfattr --absolute-names --only-values -n '%s' %s" %
+ command = ("getfattr --absolute-names -e hex "
+ "-n '%s' %s" %
(fattr, fqpath))
rcode, rout, rerr = g.run(host, command)
- if rcode == 0:
- return rout.strip()
+ if not rcode:
+ return rout.strip().split('=')[1]
g.log.error('getfattr failed: %s' % rerr)
return None