mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Clarify docs
This commit is contained in:
parent
b8ad1def85
commit
3cdd1f6644
1 changed files with 5 additions and 6 deletions
|
|
@ -166,9 +166,10 @@ class Storage(metaclass=StorageMeta):
|
||||||
def upload(self, item):
|
def upload(self, item):
|
||||||
'''Upload a new item.
|
'''Upload a new item.
|
||||||
|
|
||||||
In cases where the new etag is not known, this method may return `None`
|
In cases where the new etag cannot be atomically determined (i.e. in
|
||||||
as etag. This special case only exists because of DAV. Avoid this
|
the same "transaction" as the upload itself), this method may return
|
||||||
situation whenever possible.
|
`None` as etag. This special case only exists because of DAV. Avoid
|
||||||
|
this situation whenever possible.
|
||||||
|
|
||||||
:raises: :exc:`vdirsyncer.exceptions.PreconditionFailed` if there is
|
:raises: :exc:`vdirsyncer.exceptions.PreconditionFailed` if there is
|
||||||
already an item with that href.
|
already an item with that href.
|
||||||
|
|
@ -180,9 +181,7 @@ class Storage(metaclass=StorageMeta):
|
||||||
def update(self, href, item, etag):
|
def update(self, href, item, etag):
|
||||||
'''Update an item.
|
'''Update an item.
|
||||||
|
|
||||||
In cases where the new etag is not known, this method may return `None`
|
The etag may be none in some cases, see `upload`.
|
||||||
as etag. This special case only exists because of DAV. Avoid this
|
|
||||||
situation whenever possible.
|
|
||||||
|
|
||||||
:raises: :exc:`vdirsyncer.exceptions.PreconditionFailed` if the etag on
|
:raises: :exc:`vdirsyncer.exceptions.PreconditionFailed` if the etag on
|
||||||
the server doesn't match the given etag or if the item doesn't
|
the server doesn't match the given etag or if the item doesn't
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue