diff --git a/tests/test_sync.py b/tests/test_sync.py index 1c6b7c3..a2b7644 100644 --- a/tests/test_sync.py +++ b/tests/test_sync.py @@ -126,7 +126,13 @@ def test_already_synced(): a.upload(item) b.upload(item) status = { - '1': ({'href': '1.a', 'etag': a.get('1.a')[1]}, {'href': '1.b', 'etag': b.get('1.b')[1]}) + '1': ({ + 'href': '1.a', + 'etag': a.get('1.a')[1] + }, { + 'href': '1.b', + 'etag': b.get('1.b')[1] + }) } old_status = dict(status) a.update = b.update = a.upload = b.upload = \ diff --git a/vdirsyncer/sync.py b/vdirsyncer/sync.py index 47cbde4..b3739ca 100644 --- a/vdirsyncer/sync.py +++ b/vdirsyncer/sync.py @@ -160,6 +160,7 @@ def _status_migrate(status): 'etag': etag_b, }) + def _compress_meta(meta): '''Make in-memory metadata suitable for disk storage by removing fetched item content''' @@ -169,6 +170,7 @@ def _compress_meta(meta): 'hash': meta['item'].hash } + def sync(storage_a, storage_b, status, conflict_resolution=None, force_delete=False): '''Synchronizes two storages.