瀏覽代碼

Tweak Windows temp.close() comment line.

pull/309/head
William Ting 10 年之前
父節點
當前提交
23be6ab233
共有 1 個檔案被更改,包括 1 行新增2 行删除
  1. +1
    -2
      bin/autojump_data.py

+ 1
- 2
bin/autojump_data.py 查看文件

@ -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:

Loading…
取消
儲存