Extend atomic_write to allow setting & persisting file permissions

This commit is contained in:
Gina Häußge committed 2016-09-23 14:26:33 +02:00
1 parent 3a13dd9022
commit 080a6e9ccd
9 files changed
+114 -13

No files matched your search

@@ -129,7 +129,7 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin,
octoprint_version = get_versions()["version"]
self._version_cache["__version"] = octoprint_version
with atomic_write(self._version_cache_path) as file_obj:
with atomic_write(self._version_cache_path, max_permissions=0o666) as file_obj:
yaml.safe_dump(self._version_cache, stream=file_obj, default_flow_style=False, indent=" ", allow_unicode=True)
self._version_cache_dirty = False