From be5470c1be217efcaa2066d67cba0b0a5bf37ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Peters?= Date: Fri, 12 Dec 2008 12:37:05 +0100 Subject: [PATCH] create directory if necessary --- extra/modules/stores.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extra/modules/stores.py b/extra/modules/stores.py index dce683c..06b956e 100644 --- a/extra/modules/stores.py +++ b/extra/modules/stores.py @@ -68,6 +68,9 @@ def get_collectivity_identity_class(collectivity_id): class CollectivityIdentity(authentic.identities.Identity): _names = 'identities-' + str(collectivity_id) def store(self): + objects_dir = self.get_objects_dir() + if not os.path.exists(objects_dir): + os.mkdir(objects_dir) self._filename = os.path.join(self._names, fix_key(self.id)) self.__class__ = authentic.identities.Identity authentic.identities.Identity.store(self)