[Python-modules-commits] [python-pyld] 87/276: Check input for non-array in from_rdf.

Wolfgang Borgert debacle at moszumanska.debian.org
Wed Oct 8 23:47:56 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 9ebacf4fb9186667354677868ee1876583193734
Author: Dave Longley <dlongley at digitalbazaar.com>
Date:   Wed May 9 22:15:04 2012 -0400

    Check input for non-array in from_rdf.
---
 lib/pyld/jsonld.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py
index edf9166..be72cc6 100644
--- a/lib/pyld/jsonld.py
+++ b/lib/pyld/jsonld.py
@@ -128,7 +128,7 @@ def from_rdf(input, options=None):
       specified by the format option or an array of the RDF statements
       to convert.
     :param [options]: the options to use:
-      [format] the format if input is a string:
+      [format] the format if input is not an array:
         'application/nquads' for N-Quads (default).
       [notType] true to use rdf:type, false to use @type (default).
 
@@ -476,7 +476,7 @@ class JsonLdProcessor:
         options.setdefault('format', 'application/nquads')
         options.setdefault('notType', False)
 
-        if _is_string(statements):
+        if not _is_array(statements):
             # supported formats (processor-specific and global)
             if ((self.rdf_parsers is not None and
                 not options['format'] in self.rdf_parsers) or

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