ParisNeo commited on
Commit
e8549ea
·
unverified ·
1 Parent(s): 2426dd7

Removed useless try/except

Browse files
Files changed (1) hide show
  1. 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
- try:
27
- from neo4j import (
28
- AsyncGraphDatabase,
29
- exceptions as neo4jExceptions,
30
- AsyncDriver,
31
- AsyncManagedTransaction,
32
- GraphDatabase,
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")