[FIX] ensure data-dir (and subdirs) exists

bzr revid: chs@openerp.com-20140116100243-ltp6yunvm1bnvn5q
This commit is contained in:
Christophe Simonis 2014-01-16 11:02:43 +01:00
parent 5269664102
commit a73c02075a
1 changed files with 8 additions and 2 deletions

View File

@ -626,11 +626,17 @@ class configmanager(object):
@property
def addons_data_dir(self):
return os.path.join(self['data_dir'], 'addons', release.series)
d = os.path.join(self['data_dir'], 'addons', release.series)
if not os.path.exists(d):
os.makedirs(d)
return d
@property
def session_dir(self):
return os.path.join(self['data_dir'], 'sessions')
d = os.path.join(self['data_dir'], 'sessions')
if not os.path.exists(d):
os.makedirs(d)
return d
config = configmanager()