mirror of
				https://github.com/python-kasa/python-kasa.git
				synced 2025-11-04 06:32:07 +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:
		@@ -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:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user