mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +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 = self.idents.setdefault(item.ident, {})
|
||||||
props['item'] = item
|
props['item'] = item
|
||||||
props['ident'] = item.ident
|
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,
|
raise IdentConflict(storage=self.storage,
|
||||||
hrefs=[props['href'], href])
|
hrefs=[props['href'], href])
|
||||||
if props['etag'] != etag:
|
if props.setdefault('etag', etag) != etag:
|
||||||
raise SyncError('Etag changed during sync.')
|
raise SyncError('Etag changed during sync.')
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue