Ver a proveniência

Tweak Windows temp.close() comment line.

pull/309/head
William Ting há 10 anos
ascendente
cometimento
23be6ab233
1 ficheiros alterados com 1 adições e 2 eliminações
  1. +1
    -2
      bin/autojump_data.py

+ 1
- 2
bin/autojump_data.py Ver ficheiro

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

Carregando…
Cancelar
Guardar