atomic_write: use keyword for mode argument

this will allow us to define atomic_write as keyword-only
as soon as py2 compatibility is dropped.
This commit is contained in:
Matthias Urlichs committed 2019-01-27 17:42:36 +01:00
1 parent c05b6572c5
commit 41fab8a36c
9 files changed
+11 -12

No files matched your search

+1 -1
View File
@@ -893,7 +893,7 @@ class PreemptiveCache(object):
with self._lock:
try:
with atomic_write(self.cachefile, 'wb', max_permissions=0o666) as handle:
with atomic_write(self.cachefile, mode='wb', max_permissions=0o666) as handle:
yaml.safe_dump(data, handle,default_flow_style=False, indent=4, allow_unicode=True)
except:
self._logger.exception("Error while writing {}".format(self.cachefile))