1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2025-02-06 10:09:50 +00:00

json.dump bug fix

This commit is contained in:
Sacha Arnoud 2021-09-21 16:33:20 +00:00
parent 5fb593d50a
commit f02f87db8e

View File

@ -1830,7 +1830,7 @@ def write_json_file(obj, fn):
try: try:
with tf: with tf:
json.dump(obj) json.dump(obj, tf)
if sys.platform == 'win32': if sys.platform == 'win32':
# Need to remove existing file on Windows, else os.rename raises # Need to remove existing file on Windows, else os.rename raises
# WindowsError or FileExistsError. # WindowsError or FileExistsError.