From 77a9c56f5bd3fb72268fb90888b66ece48dc2cf0 Mon Sep 17 00:00:00 2001 From: Teemu Rytilahti Date: Thu, 2 May 2024 19:00:53 +0200 Subject: [PATCH] Use Path.save for saving the fixtures This should fix the saving on Windows. --- devtools/dump_devinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/dump_devinfo.py b/devtools/dump_devinfo.py index 1c7fb42d8..a6b27e952 100644 --- a/devtools/dump_devinfo.py +++ b/devtools/dump_devinfo.py @@ -164,7 +164,7 @@ async def handle_device(basedir, autosave, device: Device, batch_size: int): if save == "y": click.echo(f"Saving info to {save_filename}") - with open(save_filename, "w") as f: + with save_filename.open("w") as f: json.dump(fixture_result.data, f, sort_keys=True, indent=4) f.write("\n") else: