Skip to content

Commit

Permalink
Merge pull request #163 from pkalever/fix-fdopen
Browse files Browse the repository at this point in the history
save_to_file: fix fd open mode
  • Loading branch information
maurizio-lombardi authored Jun 9, 2020
2 parents 832ca0d + fc7c15f commit 4fdf6db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rtslib/root.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ def save_to_file(self, save_file=None, so_path=None):
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()
Expand Down

0 comments on commit 4fdf6db

Please sign in to comment.