1.1 --- a/imiptools/stores/file.py Tue Oct 17 23:30:18 2017 +0200
1.2 +++ b/imiptools/stores/file.py Wed Oct 18 00:18:37 2017 +0200
1.3 @@ -19,7 +19,8 @@
1.4 this program. If not, see <http://www.gnu.org/licenses/>.
1.5 """
1.6
1.7 -from imiptools.stores.common import StoreBase, PublisherBase, JournalBase
1.8 +from imiptools.stores.common import StoreBase, PublisherBase, JournalBase, \
1.9 + StoreInitialisationError
1.10
1.11 from datetime import datetime
1.12 from imiptools.config import settings
1.13 @@ -62,7 +63,10 @@
1.14 "A file store of tabular free/busy data and objects."
1.15
1.16 def __init__(self, store_dir=None):
1.17 - FileBase.__init__(self, store_dir or STORE_DIR)
1.18 + try:
1.19 + FileBase.__init__(self, store_dir or STORE_DIR)
1.20 + except OSError, exc:
1.21 + raise StoreInitialisationError, exc
1.22
1.23 # Store object access.
1.24
1.25 @@ -707,7 +711,10 @@
1.26 "A publisher of objects."
1.27
1.28 def __init__(self, store_dir=None):
1.29 - FileBase.__init__(self, store_dir or PUBLISH_DIR)
1.30 + try:
1.31 + FileBase.__init__(self, store_dir or PUBLISH_DIR)
1.32 + except OSError, exc:
1.33 + raise StoreInitialisationError, exc
1.34
1.35 def set_freebusy(self, user, freebusy):
1.36