Commit 11324e46 authored by Romain Bignon's avatar Romain Bignon

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

parent eb95c3f9
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment