[Python-modules-commits] [python-pyld] 140/276: Only output language tag if non-empty.
Wolfgang Borgert
debacle at moszumanska.debian.org
Wed Oct 8 23:48:03 UTC 2014
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to branch master
in repository python-pyld.
commit b42981d4734552105f504952302f26018cc5d013
Author: Dave Longley <dlongley at digitalbazaar.com>
Date: Thu Jul 11 12:25:37 2013 -0400
Only output language tag if non-empty.
---
lib/pyld/jsonld.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py
index 9fac7bc..a52a54d 100644
--- a/lib/pyld/jsonld.py
+++ b/lib/pyld/jsonld.py
@@ -1259,7 +1259,8 @@ class JsonLdProcessor:
.replace('\"', '\\"'))
quad += '"' + escaped + '"'
if o['datatype'] == RDF_LANGSTRING:
- quad += '@' + o['language']
+ if o['language']:
+ quad += '@' + o['language']
elif o['datatype'] != XSD_STRING:
quad += '^^<' + o['datatype'] + '>'
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pyld.git
More information about the Python-modules-commits
mailing list