Fix tangled logic

This commit is contained in:
Markus Unterwaditzer 2014-06-18 16:49:33 +02:00
parent 7ad89d439b
commit 4bfc466d9f

View file

@ -104,8 +104,9 @@ def sync(storage_a, storage_b, status, conflict_resolution=None,
safety. Setting this parameter to ``True`` disables this safety safety. Setting this parameter to ``True`` disables this safety
measure. 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() raise BothReadOnly()
a_href_to_status = dict( a_href_to_status = dict(
(href_a, (ident, etag_a)) (href_a, (ident, etag_a))
for ident, (href_a, etag_a, href_b, etag_b) in iteritems(status) for ident, (href_a, etag_a, href_b, etag_b) in iteritems(status)