Kaynağa Gözat

Move upload_all from BaseCollection to Collection

This is not used anywhere outside of Collection and probably never will be as WebDAV doesn't support bulk uploads.
Unrud 9 yıl önce
ebeveyn
işleme
6045ad97fe
1 değiştirilmiş dosya ile 13 ekleme ve 13 silme
  1. 13 13
      radicale/storage.py

+ 13 - 13
radicale/storage.py

@@ -321,19 +321,6 @@ class BaseCollection:
         """Upload a new item."""
         raise NotImplementedError
 
-    def upload_all(self, vobject_items):
-        """Upload a new set of items.
-
-        This takes a mapping of href and vobject items and
-        returns a list of uploaded items.
-        Might bring optimizations on some storages.
-
-        """
-        return [
-            self.upload(href, vobject_item)
-            for href, vobject_item in vobject_items.items()
-        ]
-
     def update(self, href, vobject_item):
         """Update an item.
 
@@ -596,6 +583,19 @@ class Collection(BaseCollection):
 
         return cls(sane_path, principal=principal)
 
+    def upload_all(self, vobject_items):
+        """Upload a new set of items.
+
+        This takes a mapping of href and vobject items and
+        returns a list of uploaded items.
+        Might bring optimizations on some storages.
+
+        """
+        return [
+            self.upload(href, vobject_item)
+            for href, vobject_item in vobject_items.items()
+        ]
+
     @classmethod
     def move(cls, item, to_collection, to_href):
         os.replace(