Rename upload_all_atomic to _upload_all_atomic

This commit is contained in:
Unrud 2017-06-09 02:30:02 +02:00 committed by Unrud
parent dbd06a1952
commit 48d2a33053

View File

@ -726,7 +726,7 @@ class Collection(BaseCollection):
href = self._find_available_file_name(
vobject_items.get, suffix=".ics")
vobject_items[href] = new_collection
self.upload_all_nonatomic(vobject_items)
self._upload_all_nonatomic(vobject_items)
elif props.get("tag") == "VCARD":
vobject_items = {}
for card in collection:
@ -735,7 +735,7 @@ class Collection(BaseCollection):
href = self._find_available_file_name(
vobject_items.get, suffix=".vcf")
vobject_items[href] = card
self.upload_all_nonatomic(vobject_items)
self._upload_all_nonatomic(vobject_items)
# This operation is not atomic on the filesystem level but it's
# very unlikely that one rename operations succeeds while the
@ -748,6 +748,10 @@ class Collection(BaseCollection):
return cls(sane_path, principal=principal)
def upload_all_nonatomic(self, vobject_items):
"""DEPRECATED: Use ``_upload_all_nonatomic``"""
return self._upload_all_nonatomic(vobject_items)
def _upload_all_nonatomic(self, vobject_items):
"""Upload a new set of items.
This takes a mapping of href and vobject items and