1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

Tweak Windows temp.close() comment line.

This commit is contained in:
William Ting 2014-08-17 16:00:08 -07:00
parent c889aa013e
commit 23be6ab233

View File

@ -119,9 +119,8 @@ def save(config, data):
# atomically save by writing to temporary file and moving to destination
try:
# write to temp file
temp = NamedTemporaryFile(delete=False)
# prevent Windows errors by closing the file before opening it.
# Windows cannot reuse the same open file name
temp.close()
with open(temp.name, 'w', encoding='utf-8', errors='replace') as f: