Chris Beaven avatar Chris Beaven committed 0adc1b8

Minor PEP8 fixes for mosso backend (and remove an unused import)

Comments (0)

Files changed (1)

backends/mosso.py

 Custom storage for django with Mosso Cloud Files backend.
 Created by Rich Leland <rich@richleland.com>.
 """
-import re
-
 from django.conf import settings
 from django.core.files import File
 from django.core.files.storage import Storage
     import cloudfiles
     from cloudfiles.errors import NoSuchObject
 except ImportError:
-    raise ImproperlyConfigured, "Could not load cloudfiles dependency. See http://www.mosso.com/cloudfiles.jsp."
+    raise ImproperlyConfigured("Could not load cloudfiles dependency. See "
+                               "http://www.mosso.com/cloudfiles.jsp.")
 
 # TODO: implement TTL into cloudfiles methods
 CLOUDFILES_TTL = getattr(settings, 'CLOUDFILES_TTL', 600)
     """
     Simple, custom upload_to because Cloud Files doesn't support
     nested containers (directories).
-    
+
     Actually found this out from @minter:
-    @richleland The Cloud Files APIs do support pseudo-subdirectories, by 
+    @richleland The Cloud Files APIs do support pseudo-subdirectories, by
     creating zero-byte files with type application/directory.
-    
+
     May implement in a future version.
     """
     return get_valid_filename(filename)
 
     def exists(self, name):
         """
-        Returns True if a file referened by the given name already exists in the
-        storage system, or False if the name is available for a new file.
+        Returns True if a file referenced by the given name already exists in
+        the storage system, or False if the name is available for a new file.
         """
         try:
             self._get_cloud_obj(name)
         Lists the contents of the specified path, returning a 2-tuple; the
         first being an empty list of directories (not available for quick-
         listing), the second being a list of filenames.
-        
+
         If the list of directories is required, use the full_listdir method.
         """
         files = []
         """
         Lists the contents of the specified path, returning a 2-tuple of lists;
         the first item being directories, the second item being files.
-        
+
         On large containers, this may be a slow operation for root containers
         because every single object must be returned (cloudfiles does not
         provide an explicit way of listing directories).
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.