1
0
Fork 0

Fix bugs related to sanitize_info

Related: 8012d892bd (r54555230)
This commit is contained in:
pukkandan 2021-08-07 21:16:55 +05:30
commit 6e84b21559
No known key found for this signature in database
GPG key ID: 0F00D95A001F4698
3 changed files with 34 additions and 11 deletions

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.