Commit 72b8884b by rfkelly0

expose.fuse: avoid need to simulate xattr support

parent b95b6dc5
...@@ -55,7 +55,6 @@ import pickle ...@@ -55,7 +55,6 @@ import pickle
from fs.base import flags_to_mode, threading from fs.base import flags_to_mode, threading
from fs.errors import * from fs.errors import *
from fs.path import * from fs.path import *
from fs.xattrs import ensure_xattrs
import fuse_ctypes as fuse import fuse_ctypes as fuse
try: try:
...@@ -126,7 +125,7 @@ class FSOperations(Operations): ...@@ -126,7 +125,7 @@ class FSOperations(Operations):
"""FUSE Operations interface delegating all activities to an FS object.""" """FUSE Operations interface delegating all activities to an FS object."""
def __init__(self,fs,on_init=None,on_destroy=None): def __init__(self,fs,on_init=None,on_destroy=None):
self.fs = ensure_xattrs(fs) self.fs = fs
self._on_init = on_init self._on_init = on_init
self._on_destroy = on_destroy self._on_destroy = on_destroy
self._fhmap = {} self._fhmap = {}
...@@ -184,8 +183,7 @@ class FSOperations(Operations): ...@@ -184,8 +183,7 @@ class FSOperations(Operations):
try: try:
value = self.fs.getxattr(path,name) value = self.fs.getxattr(path,name)
except AttributeError: except AttributeError:
# TODO: raise ENODATA, avoid the need for ensure_xattrs raise OSError(errno.ENODATA,"no attribute '%s'" % (name,))
raise UnsupportedError("getxattr")
else: else:
if value is None: if value is None:
raise OSError(errno.ENODATA,"no attribute '%s'" % (name,)) raise OSError(errno.ENODATA,"no attribute '%s'" % (name,))
...@@ -200,7 +198,7 @@ class FSOperations(Operations): ...@@ -200,7 +198,7 @@ class FSOperations(Operations):
try: try:
return self.fs.listxattrs(path) return self.fs.listxattrs(path)
except AttributeError: except AttributeError:
raise UnsupportedError("listxattr") return []
@handle_fs_errors @handle_fs_errors
def mkdir(self,path,mode): def mkdir(self,path,mode):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment