mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Use helper function
This commit is contained in:
parent
a19838327d
commit
e0316880b4
1 changed files with 2 additions and 6 deletions
|
|
@ -18,6 +18,7 @@
|
||||||
import itertools
|
import itertools
|
||||||
|
|
||||||
from . import exceptions, log
|
from . import exceptions, log
|
||||||
|
from .utils import uniq
|
||||||
from .utils.compat import iteritems, text_type
|
from .utils.compat import iteritems, text_type
|
||||||
sync_logger = log.get(__name__)
|
sync_logger = log.get(__name__)
|
||||||
|
|
||||||
|
|
@ -265,12 +266,7 @@ def _get_actions(storages, status):
|
||||||
storage_a, a_idents = storages['a']
|
storage_a, a_idents = storages['a']
|
||||||
storage_b, b_idents = storages['b']
|
storage_b, b_idents = storages['b']
|
||||||
|
|
||||||
handled = set()
|
for ident in uniq(itertools.chain(a_idents, b_idents, status)):
|
||||||
for ident in itertools.chain(a_idents, b_idents, status):
|
|
||||||
if ident in handled:
|
|
||||||
continue
|
|
||||||
handled.add(ident)
|
|
||||||
|
|
||||||
a = a_idents.get(ident, None)
|
a = a_idents.get(ident, None)
|
||||||
b = b_idents.get(ident, None)
|
b = b_idents.get(ident, None)
|
||||||
assert not a or a['etag'] is not None
|
assert not a or a['etag'] is not None
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue