From 42070a2115b330b54b83523056554911b38037a4 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 5 Jan 2017 08:36:50 +0100 Subject: o Better check for db.update_url. --- trygvis/eda/cli/__init__.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'trygvis') diff --git a/trygvis/eda/cli/__init__.py b/trygvis/eda/cli/__init__.py index 69905cd..308e1bd 100644 --- a/trygvis/eda/cli/__init__.py +++ b/trygvis/eda/cli/__init__.py @@ -45,17 +45,12 @@ def with_database(tx): raise CliException("The database is corrupt: %s" % path) elif db_type == 'sparql': query_endpoint = config["db"]["url"] + update_endpoint = config["db"].get("update_url") - if not hasattr(config["db"], "update_url") is None: + if update_endpoint is None: g = sparqlstore.SPARQLStore() g.open(query_endpoint) else: - update_endpoint = config["db"]["update_url"] - # def my_bnode_ext(node): - # if isinstance(node, BNode): - # return '' % node - # else: - # return sparqlstore._node_to_sparql(node) g = sparqlstore.SPARQLUpdateStore(autocommit=False) g.open((query_endpoint, update_endpoint)) else: -- cgit v1.2.3