[Python-modules-commits] [python-pyld] 02/07: Fix conflicting index bug

Wolfgang Borgert debacle at moszumanska.debian.org
Tue Oct 13 22:56:33 UTC 2015


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to tag 0.6.8
in repository python-pyld.

commit 921c9c230b43d25edd24be1c0caf96dfeacc1881
Author: Hassan Almas <halmas at ice.digitalbazaar.com>
Date:   Mon Mar 16 11:45:25 2015 -0400

    Fix conflicting index bug
---
 lib/pyld/jsonld.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py
index 4f96933..52a857e 100644
--- a/lib/pyld/jsonld.py
+++ b/lib/pyld/jsonld.py
@@ -3017,7 +3017,9 @@ class JsonLdProcessor(object):
 
             # copy non- at type keywords
             if property != '@type' and _is_keyword(property):
-                if property == '@index' and '@index' in subject:
+                if property == '@index' and '@index' in subject \
+                    and (input_['@index'] != subject['@index'] or
+                         input_['@index']['@id'] != subject['@index']['@id']):
                     raise JsonLdError(
                         'Invalid JSON-LD syntax; conflicting @index property '
                         ' detected.', 'jsonld.SyntaxError',

-- 
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