Skip to content

Commit b323495

Browse files
Update sparql_endpoint.py
1 parent 358bbfc commit b323495

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

ted_sws/data_manager/adapters/sparql_endpoint.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,14 @@ class SPARQLTripleStoreEndpoint(TripleStoreEndpointABC):
128128
def __init__(self, endpoint_url: str, user: str = None, password: str = None, use_post_method: bool = False):
129129
user = user if user else config.AGRAPH_SUPER_USER
130130
password = password if password else config.AGRAPH_SUPER_PASSWORD
131-
self.endpoint = SPARQLClientPool.create_or_reuse_connection(endpoint_url, user, password,
132-
use_post_method=use_post_method)
131+
sparql_wrapper = SPARQLWrapper(endpoint_url)
132+
sparql_wrapper.setCredentials(
133+
user=user,
134+
passwd=password
135+
)
136+
if use_post_method:
137+
sparql_wrapper.setMethod(method=POST)
138+
self.endpoint = sparql_wrapper
133139

134140
def _set_sparql_query(self, sparql_query: str):
135141
"""

0 commit comments

Comments
 (0)