From 42d69b1dbd695d2135d1caa939a3d6768f251f0f Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Sat, 14 Jun 2014 21:49:04 +0200 Subject: [PATCH] Fix faulty logic again --- vdirsyncer/storage/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vdirsyncer/storage/base.py b/vdirsyncer/storage/base.py index 924993b..a180098 100644 --- a/vdirsyncer/storage/base.py +++ b/vdirsyncer/storage/base.py @@ -41,12 +41,14 @@ class Storage(object): # A value of True means the storage does not support write-methods such as # upload, update and delete. A value of False means the storage does # support those methods, but it may also be used in read-only mode. - read_only = None + read_only = False # The attribute values to show in the representation of the storage. _repr_attributes = () def __init__(self, read_only=None): + if read_only is None: + read_only = self.read_only if self.read_only and not read_only: raise ValueError('This storage is read-only.') self.read_only = bool(read_only)