From 72a14cdc86b226e913d6f80ccaf3d6962bdd7ce3 Mon Sep 17 00:00:00 2001 From: Rob Speer Date: Wed, 2 Nov 2016 18:53:16 -0400 Subject: [PATCH] Fix a KeyError in N-Quads normalization --- lib/pyld/jsonld.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py index ae27b9cc..019a257c 100755 --- a/lib/pyld/jsonld.py +++ b/lib/pyld/jsonld.py @@ -1614,7 +1614,7 @@ def to_nquad(triple, graph_name=None): .replace('\"', '\\"')) quad += '"' + escaped + '"' if o['datatype'] == RDF_LANGSTRING: - if o['language']: + if o.get('language'): quad += '@' + o['language'] elif o['datatype'] != XSD_STRING: quad += '^^<' + o['datatype'] + '>'