From 6045ad97feafc633122b170aed33211b8db26083 Mon Sep 17 00:00:00 2001 From: Unrud Date: Thu, 25 Aug 2016 05:47:31 +0200 Subject: [PATCH] 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. --- radicale/storage.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/radicale/storage.py b/radicale/storage.py index 102bfc1..8b444f3 100644 --- a/radicale/storage.py +++ b/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(