Merge pull request #872 from ParisNeo/main
Fix ImportError by Removing Redundant Try-Except Block
This commit is contained in:
@@ -23,7 +23,6 @@ import pipmaster as pm
|
||||
if not pm.is_installed("neo4j"):
|
||||
pm.install("neo4j")
|
||||
|
||||
try:
|
||||
from neo4j import (
|
||||
AsyncGraphDatabase,
|
||||
exceptions as neo4jExceptions,
|
||||
@@ -31,10 +30,6 @@ try:
|
||||
AsyncManagedTransaction,
|
||||
GraphDatabase,
|
||||
)
|
||||
except ImportError as e:
|
||||
raise ImportError(
|
||||
"`neo4j` library is not installed. Please install it via pip: `pip install neo4j`."
|
||||
) from e
|
||||
|
||||
config = configparser.ConfigParser()
|
||||
config.read("config.ini", "utf-8")
|
||||
|
@@ -20,13 +20,8 @@ if not pm.is_installed("networkx"):
|
||||
if not pm.is_installed("graspologic"):
|
||||
pm.install("graspologic")
|
||||
|
||||
try:
|
||||
from graspologic import embed
|
||||
import networkx as nx
|
||||
except ImportError as e:
|
||||
raise ImportError(
|
||||
"`networkx` library is not installed. Please install it via pip: `pip install networkx`."
|
||||
) from e
|
||||
|
||||
|
||||
@final
|
||||
|
Reference in New Issue
Block a user