Removed useless try/except
Browse files- lightrag/kg/neo4j_impl.py +7 -12
lightrag/kg/neo4j_impl.py
CHANGED
@@ -23,18 +23,13 @@ import pipmaster as pm
|
|
23 |
if not pm.is_installed("neo4j"):
|
24 |
pm.install("neo4j")
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
)
|
34 |
-
except ImportError as e:
|
35 |
-
raise ImportError(
|
36 |
-
"`neo4j` library is not installed. Please install it via pip: `pip install neo4j`."
|
37 |
-
) from e
|
38 |
|
39 |
config = configparser.ConfigParser()
|
40 |
config.read("config.ini", "utf-8")
|
|
|
23 |
if not pm.is_installed("neo4j"):
|
24 |
pm.install("neo4j")
|
25 |
|
26 |
+
from neo4j import (
|
27 |
+
AsyncGraphDatabase,
|
28 |
+
exceptions as neo4jExceptions,
|
29 |
+
AsyncDriver,
|
30 |
+
AsyncManagedTransaction,
|
31 |
+
GraphDatabase,
|
32 |
+
)
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
config = configparser.ConfigParser()
|
35 |
config.read("config.ini", "utf-8")
|