more generic test in creation of config file (closes #556)
This commit is contained in:
parent
8be0f5e3dd
commit
2316872c0c
1 changed files with 6 additions and 5 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue