diff --git a/client/djrandom_client/djfuse.py b/client/djrandom_client/djfuse.py index e77556b536fc9b1de1adbe8c007c99b9b529f532..0a6604a12c252acfcc43a8ab2eaad96aa1925828 100644 --- a/client/djrandom_client/djfuse.py +++ b/client/djrandom_client/djfuse.py @@ -4,7 +4,7 @@ import shutil import urllib2 from errno import EINVAL, ENOENT from stat import S_IFDIR, S_IFREG -from fuse import FUSE, FuseOSError, Operations, LoggingMixIn +from fuse import FUSE, Operations, LoggingMixIn class DJFS(LoggingMixIn, Operations): @@ -61,7 +61,7 @@ class DJFS(LoggingMixIn, Operations): def _parse_path(self, path): parts = path.split('/') if len(parts) > 3: - raise FuseOSError(EINVAL) + raise OSError(EINVAL) if len(parts) < 3: parts.extend([None for x in (3 - len(parts))]) return parts @@ -71,7 +71,7 @@ class DJFS(LoggingMixIn, Operations): if title: sha1 = self._cache_get(artist, album, title) if not sha1: - raise FuseOSError(ENOENT) + raise OSError(ENOENT) stats = self._get('/json/song/%s' % sha1) mtime = float(stats['uploaded_at']) return dict(st_mode=(S_IFREG | 0444), st_nlink=1, @@ -86,7 +86,7 @@ class DJFS(LoggingMixIn, Operations): def readdir(self, path, fh=None): artist, album, title = self._parse_path(path) if title: - raise FuseOSError(EINVAL) + raise OSError(EINVAL) if not artist: values = self._get('/json/artists')['artists'] elif not album: