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.
This commit is contained in:
Teemu R 2024-05-03 13:57:43 +02:00 committed by GitHub
parent 5b486074e2
commit 88381f270f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: