[Python-modules-commits] [python-pyld] 40/276: Bugfix: after checking that frame is a non-empty array, take context from element 0.

Wolfgang Borgert debacle at moszumanska.debian.org
Wed Oct 8 23:47:51 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 5b7c3fcc4a2301dc56614c4325ee475958b5d931
Author: jmandel <jmandel at alum.mit.edu>
Date:   Tue Nov 22 12:50:48 2011 -0500

    Bugfix:  after checking that frame is a non-empty array, take context from element 0.
---
 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 4d3845a..f181ba9 100644
--- a/lib/pyld/jsonld.py
+++ b/lib/pyld/jsonld.py
@@ -1427,7 +1427,7 @@ class Processor:
         elif isinstance(frame, list):
             # save first context in the array
             if len(frame) > 0 and '@context' in frame[0]:
-                ctx = copy.copy(frame['@context'])
+                ctx = copy.copy(frame[0]['@context'])
 
             # expand all elements in the array
             tmp = []

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