From f06ee530d94f2afd505d96142d5263d120fe0d10 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey Date: Tue, 26 Jul 2016 16:01:26 +0100 Subject: [PATCH] Put the original pattern in the ParseError for ntriples.eat() --- rdflib/plugins/parsers/ntriples.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rdflib/plugins/parsers/ntriples.py b/rdflib/plugins/parsers/ntriples.py index 7c8530e50..9283b822c 100644 --- a/rdflib/plugins/parsers/ntriples.py +++ b/rdflib/plugins/parsers/ntriples.py @@ -207,7 +207,7 @@ def eat(self, pattern): if not m: # @@ Why can't we get the original pattern? # print(dir(pattern)) # print repr(self.line), type(self.line) - raise ParseError("Failed to eat %s at %s" % (pattern, self.line)) + raise ParseError("Failed to eat %s at %s" % (pattern.pattern, self.line)) self.line = self.line[m.end():] return m