This commit is contained in:
Kovid Goyal 2015-11-18 08:03:42 +05:30
parent b5801dc63d
commit 58c7d4a5b7

View File

@ -126,7 +126,7 @@ def atomic_write(name, raw):
tname = ('_' if iswindows else '.') + bname
with open(os.path.join(bdir, tname), 'wb') as f:
f.write(raw)
atomic_rename(tname, name)
atomic_rename(f.name, name)
def writefile(path, data, enc='utf-8'):
if enc == undefined: