Fix problems from pyflakes output
This commit is contained in:
@@ -14,9 +14,7 @@
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import urlparse
|
||||
import uuid
|
||||
|
||||
from werkzeug.utils import secure_filename
|
||||
|
||||
@@ -73,8 +73,7 @@ class CloudFilesStorage(StorageInterface):
|
||||
|
||||
def file_exists(self, filepath):
|
||||
try:
|
||||
object = self.container.get_object(
|
||||
self._resolve_filepath(filepath))
|
||||
self.container.get_object( self._resolve_filepath(filepath))
|
||||
return True
|
||||
except cloudfiles.errors.NoSuchObject:
|
||||
return False
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
from mediagoblin.storage import StorageInterface, clean_listy_filepath
|
||||
|
||||
|
||||
class MountError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class MountStorage(StorageInterface):
|
||||
"""
|
||||
Experimental "Mount" virtual Storage Interface
|
||||
@@ -105,7 +109,7 @@ class MountStorage(StorageInterface):
|
||||
def resolve_to_backend(self, filepath):
|
||||
backend, filepath = self._resolve_to_backend(filepath)
|
||||
if backend is None:
|
||||
raise Error("Path not mounted")
|
||||
raise MountError("Path not mounted")
|
||||
return backend, filepath
|
||||
|
||||
def __repr__(self, table=None, indent=[]):
|
||||
|
||||
Reference in New Issue
Block a user