From 376213ffcdd6b65acd104ddaa34b272ae8656823 Mon Sep 17 00:00:00 2001 From: Gunnar Aastrand Grimnes Date: Thu, 16 Feb 2017 09:21:41 +0100 Subject: fixed expandTriples for nested bnodes --- rdflib/plugins/sparql/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rdflib/plugins/sparql/parser.py b/rdflib/plugins/sparql/parser.py index a8a4426b..eda40bf2 100644 --- a/rdflib/plugins/sparql/parser.py +++ b/rdflib/plugins/sparql/parser.py @@ -58,7 +58,7 @@ def expandTriples(terms): elif t == ';': if i+1 == len(terms) or terms[i+1] == ";" or terms[i+1] == ".": continue # this semicolon is spurious - res.append(res[-3]) + res.append(res[0]) elif isinstance(t, list): # BlankNodePropertyList # is this bnode the object of previous triples? -- cgit v1.2.1