From 65231d1a13668c12b8720168f4a9c5965b7e6da0 Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Mon, 25 Jul 2011 02:07:13 +0100 Subject: [PATCH] use OSError --- client/djrandom_client/djfuse.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/djrandom_client/djfuse.py b/client/djrandom_client/djfuse.py index e77556b..0a6604a 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: -- GitLab