Skip to content

Commit

Permalink
Set update endpoint similar to query endpoint for sparqlstore if only…
Browse files Browse the repository at this point in the history
… one is given
  • Loading branch information
white-gecko committed May 1, 2020
1 parent a39c1a7 commit 48a250e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions rdflib/plugins/stores/sparqlstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,8 @@ def __len__(self, *args, **kwargs):
def open(self, configuration, create=False):
"""
sets the endpoint URLs for this SPARQLStore
:param configuration: either a tuple of (queryEndpoint, update_endpoint),
or a string with the query endpoint
:param configuration: either a tuple of (query_endpoint, update_endpoint),
or a string with the endpoint which is configured as query and update endpoint
:param create: if True an exception is thrown.
"""

Expand All @@ -507,9 +507,7 @@ def open(self, configuration, create=False):
self.update_endpoint = configuration[1]
else:
self.query_endpoint = configuration

if not self.update_endpoint:
self.update_endpoint = self.endpoint
self.update_endpoint = configuration

def _transaction(self):
if self._edits is None:
Expand Down

0 comments on commit 48a250e

Please sign in to comment.