aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/storage
diff options
context:
space:
mode:
authorWill Kahn-Greene <willg@bluesock.org>2012-06-03 15:53:34 -0400
committerWill Kahn-Greene <willg@bluesock.org>2012-06-03 15:53:34 -0400
commita855e92a985a9bdc9c5062cad268eba3d8e19f84 (patch)
treec238588282e361e8dccc77b94aa8e3b1d54c0c45 /mediagoblin/storage
parent349f5b19f768f4880b544732c77991ef7bdab6c8 (diff)
downloadmediagoblin-a855e92a985a9bdc9c5062cad268eba3d8e19f84.tar.lz
mediagoblin-a855e92a985a9bdc9c5062cad268eba3d8e19f84.tar.xz
mediagoblin-a855e92a985a9bdc9c5062cad268eba3d8e19f84.zip
Fix problems from pyflakes output
Diffstat (limited to 'mediagoblin/storage')
-rw-r--r--mediagoblin/storage/__init__.py2
-rw-r--r--mediagoblin/storage/cloudfiles.py3
-rw-r--r--mediagoblin/storage/mountstorage.py6
3 files changed, 6 insertions, 5 deletions
diff --git a/mediagoblin/storage/__init__.py b/mediagoblin/storage/__init__.py
index e7ea1aa5..3df56c2e 100644
--- a/mediagoblin/storage/__init__.py
+++ b/mediagoblin/storage/__init__.py
@@ -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
diff --git a/mediagoblin/storage/cloudfiles.py b/mediagoblin/storage/cloudfiles.py
index c800005f..ce517932 100644
--- a/mediagoblin/storage/cloudfiles.py
+++ b/mediagoblin/storage/cloudfiles.py
@@ -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
diff --git a/mediagoblin/storage/mountstorage.py b/mediagoblin/storage/mountstorage.py
index 3fdf4ef0..dffc619b 100644
--- a/mediagoblin/storage/mountstorage.py
+++ b/mediagoblin/storage/mountstorage.py
@@ -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=[]):