mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Simplify code a little
This commit is contained in:
parent
6e27770271
commit
e305869fac
1 changed files with 2 additions and 3 deletions
|
|
@ -464,16 +464,15 @@ class _StorageInfo(object):
|
||||||
prefetch = []
|
prefetch = []
|
||||||
|
|
||||||
def _store_props(ident, props):
|
def _store_props(ident, props):
|
||||||
nonlocal storage_nonempty
|
|
||||||
storage_nonempty = True
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.status.insert_ident(ident, props)
|
self.status.insert_ident(ident, props)
|
||||||
except _IdentAlreadyExists as e:
|
except _IdentAlreadyExists as e:
|
||||||
raise e.to_ident_conflict(self.storage)
|
raise e.to_ident_conflict(self.storage)
|
||||||
|
|
||||||
for href, etag in self.storage.list():
|
for href, etag in self.storage.list():
|
||||||
|
storage_nonempty = True
|
||||||
ident, meta = self.status.get_by_href(href)
|
ident, meta = self.status.get_by_href(href)
|
||||||
|
|
||||||
if meta is None or meta.href != href or meta.etag != etag:
|
if meta is None or meta.href != href or meta.etag != etag:
|
||||||
# Either the item is completely new, or updated
|
# Either the item is completely new, or updated
|
||||||
# In both cases we should prefetch
|
# In both cases we should prefetch
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue