From 52abf9cc50c33316b5ce16b3c5897471e497d702 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Wed, 19 Feb 2025 19:32:23 +0100 Subject: [PATCH] Removed useless try/except --- lightrag/kg/neo4j_impl.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/lightrag/kg/neo4j_impl.py b/lightrag/kg/neo4j_impl.py index 82631cf8..0ddc611d 100644 --- a/lightrag/kg/neo4j_impl.py +++ b/lightrag/kg/neo4j_impl.py @@ -23,18 +23,13 @@ import pipmaster as pm if not pm.is_installed("neo4j"): pm.install("neo4j") -try: - from neo4j import ( - AsyncGraphDatabase, - exceptions as neo4jExceptions, - AsyncDriver, - AsyncManagedTransaction, - GraphDatabase, - ) -except ImportError as e: - raise ImportError( - "`neo4j` library is not installed. Please install it via pip: `pip install neo4j`." - ) from e +from neo4j import ( + AsyncGraphDatabase, + exceptions as neo4jExceptions, + AsyncDriver, + AsyncManagedTransaction, + GraphDatabase, +) config = configparser.ConfigParser() config.read("config.ini", "utf-8")