From 4bfc466d9f9bde7edfada222bf863d74fd628d22 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Wed, 18 Jun 2014 16:49:33 +0200 Subject: [PATCH] Fix tangled logic --- vdirsyncer/sync.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vdirsyncer/sync.py b/vdirsyncer/sync.py index a772db0..e7c9ad2 100644 --- a/vdirsyncer/sync.py +++ b/vdirsyncer/sync.py @@ -104,8 +104,9 @@ def sync(storage_a, storage_b, status, conflict_resolution=None, safety. Setting this parameter to ``True`` disables this safety measure. ''' - if False not in (storage_a.read_only, storage_b.read_only): + if storage_a.read_only and storage_b.read_only: raise BothReadOnly() + a_href_to_status = dict( (href_a, (ident, etag_a)) for ident, (href_a, etag_a, href_b, etag_b) in iteritems(status)