From 9a7c0b521813df7aa4ebaa07f99e80786d8566d4 Mon Sep 17 00:00:00 2001 From: Marcel Coetzee Date: Sat, 15 Jun 2024 16:17:38 +0200 Subject: [PATCH] Remove redundant exception handling in JSON extraction Signed-off-by: Marcel Coetzee --- dlt/destinations/impl/lancedb/lancedb_client.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dlt/destinations/impl/lancedb/lancedb_client.py b/dlt/destinations/impl/lancedb/lancedb_client.py index ee3edf4055..8fcdf9710e 100644 --- a/dlt/destinations/impl/lancedb/lancedb_client.py +++ b/dlt/destinations/impl/lancedb/lancedb_client.py @@ -646,11 +646,8 @@ def __init__( records = [] f.seek(0) for line in f: - try: - json_object = json.loads(line) - records.append(json_object) - except JSONDecodeError: - raise + json_object = json.loads(line) + records.append(json_object) # Batch load only accepts a list of dicts. if not isinstance(records, list) and isinstance(records, dict):