mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
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:
parent
5b486074e2
commit
88381f270f
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user