more generic test in creation of config file (closes #556)

This commit is contained in:
Romain Bignon 2011-06-21 12:47:49 +02:00
commit 2316872c0c

View file

@ -44,12 +44,13 @@ class BackendsConfig(object):
if sys.platform == 'win32':
fptr = open(confpath,'w')
fptr.close()
elif re.match('freebsd[0-9]*', sys.platform):
fptr = open(confpath,'w')
fptr.close()
os.chmod(confpath, 0600)
else:
os.mknod(confpath, 0600)
try:
os.mknod(confpath, 0600)
except OSError:
fptr = open(confpath,'w')
fptr.close()
os.chmod(confpath, 0600)
else:
if sys.platform != 'win32':
if mode & stat.S_IRGRP or mode & stat.S_IROTH: