30 lines
885 B
Diff
30 lines
885 B
Diff
From fc7c15f882d800cc7bce03936dfec7c5b7cd13bf Mon Sep 17 00:00:00 2001
|
|
From: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
Date: Tue, 9 Jun 2020 11:47:42 +0530
|
|
Subject: [PATCH 10/15] save_to_file: fix fd open mode
|
|
|
|
since we used O_WRONLY with os.open(), lets stick to
|
|
same mode with os.fdopen() too
|
|
|
|
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
|
|
---
|
|
rtslib/root.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/rtslib/root.py b/rtslib/root.py
|
|
index 3135467..2c5cf43 100644
|
|
--- a/rtslib/root.py
|
|
+++ b/rtslib/root.py
|
|
@@ -479,7 +479,7 @@ class RTSRoot(CFSNode):
|
|
finally:
|
|
os.umask(umask_original)
|
|
|
|
- with os.fdopen(fdesc, 'w+') as f:
|
|
+ with os.fdopen(fdesc, 'w') as f:
|
|
f.write(json.dumps(saveconf, sort_keys=True, indent=2))
|
|
f.write("\n")
|
|
f.flush()
|
|
--
|
|
2.27.0
|
|
|