From 88381f270f4761a5c358afda5298dee5a33192f2 Mon Sep 17 00:00:00 2001 From: Teemu R Date: Fri, 3 May 2024 13:57:43 +0200 Subject: [PATCH] Use Path.save for saving the fixtures (#894) This might fix saving of fixture files on Windows, but it's a good practice to use pathlib where possible. --- 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 1c7fb42d..a6b27e95 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: