Fix bugs related to sanitize_info

Related: https://github.com/yt-dlp/yt-dlp/commit/8012d892bd38af731357a61e071e0a0d01bc41b4#r54555230
This commit is contained in:
pukkandan
2021-08-07 21:16:55 +05:30
parent 575e17a1b9
commit 6e84b21559
3 changed files with 34 additions and 11 deletions
+1 -1
View File
@@ -1836,7 +1836,7 @@ def write_json_file(obj, fn):
try:
with tf:
json.dump(obj, tf, default=repr)
json.dump(obj, tf)
if sys.platform == 'win32':
# Need to remove existing file on Windows, else os.rename raises
# WindowsError or FileExistsError.