Replace usage of os.mknod() by os.open(O_CREAT)
Haiku doesn't have mknod(). Actually it does now, but it might take ages for python to support it as os.mknod().
This commit is contained in:
parent
2413c4bce9
commit
ecd265de4f
1 changed files with 2 additions and 1 deletions
|
|
@ -52,7 +52,8 @@ class BackendsConfig(object):
|
|||
fptr.close()
|
||||
else:
|
||||
try:
|
||||
os.mknod(confpath, 0o600)
|
||||
fd = os.open(confpath, os.O_WRONLY | os.O_CREAT, 0o600)
|
||||
os.close(fd)
|
||||
except OSError:
|
||||
fptr = open(confpath, 'w')
|
||||
fptr.close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue