Run 2to3 over Python sources.
[cumulus.git] / python / cumulus / store / __init__.py
index 3b54cbb..e368c57 100644 (file)
@@ -16,7 +16,7 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-import exceptions, re, urlparse
+import exceptions, re, urllib.parse
 
 type_patterns = {
     'checksums': re.compile(r"^snapshot-(.*)\.(\w+)sums$"),
 
 type_patterns = {
     'checksums': re.compile(r"^snapshot-(.*)\.(\w+)sums$"),
@@ -39,7 +39,7 @@ class Store (object):
         if cls != Store:
             return super(Store, cls).__new__(cls, url, **kw)
         (scheme, netloc, path, params, query, fragment) \
         if cls != Store:
             return super(Store, cls).__new__(cls, url, **kw)
         (scheme, netloc, path, params, query, fragment) \
-            = urlparse.urlparse(url)
+            = urllib.parse.urlparse(url)
 
         try:
             cumulus = __import__('cumulus.store.%s' % scheme, globals())
 
         try:
             cumulus = __import__('cumulus.store.%s' % scheme, globals())
@@ -53,24 +53,24 @@ class Store (object):
             obj.fragment = fragment
             return obj
         except ImportError:
             obj.fragment = fragment
             return obj
         except ImportError:
-            raise NotImplementedError, "Scheme %s not implemented" % scheme
+            raise NotImplementedError("Scheme %s not implemented" % scheme)
 
 
-    def list(self, type):
+    def list(self, path):
         raise NotImplementedError
 
         raise NotImplementedError
 
-    def get(self, type, name):
+    def get(self, path):
         raise NotImplementedError
 
         raise NotImplementedError
 
-    def put(self, type, name, fp):
+    def put(self, path, fp):
         raise NotImplementedError
 
         raise NotImplementedError
 
-    def delete(self, type, name):
+    def delete(self, path):
         raise NotImplementedError
 
         raise NotImplementedError
 
-    def stat(self, type, name):
+    def stat(self, path):
         raise NotImplementedError
 
         raise NotImplementedError
 
-    def scan(self):
+    def scan(self, path):
         """Cache file information stored in this backend.
 
         This might make subsequent list or stat calls more efficient, but this
         """Cache file information stored in this backend.
 
         This might make subsequent list or stat calls more efficient, but this