[FIX] prevent unneeded chmod datadir, but check writable

This commit is contained in:
Samus CTO
2015-02-27 17:16:16 +01:00
parent e6396deb4e
commit fb285d8695
+4 -2
View File
@@ -683,7 +683,8 @@ class configmanager(object):
if not os.path.exists(d):
os.makedirs(d, 0700)
else:
os.chmod(d, 0700)
assert os.access(d, os.W_OK), \
"%s: directory is not writable" % d
return d
@property
@@ -692,7 +693,8 @@ class configmanager(object):
if not os.path.exists(d):
os.makedirs(d, 0700)
else:
os.chmod(d, 0700)
assert os.access(d, os.W_OK), \
"%s: directory is not writable" % d
return d
def filestore(self, dbname):