touch geojson file to ensure it exists before opening to write

This commit is contained in:
Viktor Barzin 2025-06-01 22:13:22 +00:00
parent 16b88c4aac
commit 8c646a5322
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863

View file

@ -12,6 +12,7 @@ async def export_immoweb(
):
data_dir = ctx.obj["data_dir"]
output_file_path = pathlib.Path(output_file)
output_file_path.touch(exist_ok=True)
listing_paths = sorted(list(pathlib.Path(data_dir).glob("*/listing.json")))
# listing_paths = listing_paths[:10]
listings = Listing.get_all_listings([str(path) for path in listing_paths])