[Python-modules-commits] [python-pyld] 111/276: Throw error if compaction context is null.

Wolfgang Borgert debacle at moszumanska.debian.org
Wed Oct 8 23:47:59 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 de8e49301ded53a8e526d234f9cb6416307b4a89
Author: Dave Longley <dlongley at digitalbazaar.com>
Date:   Tue Apr 9 11:34:34 2013 -0400

    Throw error if compaction context is null.
---
 lib/pyld/jsonld.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py
index f8d247b..c5e50fb 100644
--- a/lib/pyld/jsonld.py
+++ b/lib/pyld/jsonld.py
@@ -387,6 +387,11 @@ class JsonLdProcessor:
 
         :return: the compacted JSON-LD output.
         """
+        if ctx is None:
+            raise JsonLdError(
+                'The compaction context must not be null.',
+                'jsonld.CompactError')
+
         # nothing to compact
         if input_ is None:
             return None

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