mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Avoid lookup in hashtable
This commit is contained in:
parent
a7e311dbf2
commit
836623946d
1 changed files with 2 additions and 4 deletions
|
|
@ -115,13 +115,11 @@ class StorageInfo(object):
|
|||
props = self.idents.setdefault(item.ident, {})
|
||||
props['item'] = item
|
||||
props['ident'] = item.ident
|
||||
props.setdefault('etag', etag)
|
||||
props.setdefault('href', href)
|
||||
|
||||
if props['href'] != href:
|
||||
if props.setdefault('href', href) != href:
|
||||
raise IdentConflict(storage=self.storage,
|
||||
hrefs=[props['href'], href])
|
||||
if props['etag'] != etag:
|
||||
if props.setdefault('etag', etag) != etag:
|
||||
raise SyncError('Etag changed during sync.')
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue