parent
575e17a1b9
commit
6e84b21559
3 changed files with 34 additions and 11 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue