From ecd265de4f3e32cbcd77b0a9da86ae33561408bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Mon, 28 Jul 2014 23:05:21 +0200 Subject: [PATCH] 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(). --- weboob/core/backendscfg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weboob/core/backendscfg.py b/weboob/core/backendscfg.py index 601cd261..a7364dfa 100644 --- a/weboob/core/backendscfg.py +++ b/weboob/core/backendscfg.py @@ -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()