[Python-modules-commits] [python-pyld] 11/276: Passed nulls test.
Wolfgang Borgert
debacle at moszumanska.debian.org
Wed Oct 8 23:47:48 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 2b27d428a3108d7c903f7d57469d321ee19a5ca8
Author: Dave Longley <dlongley at digitalbazaar.com>
Date: Fri Jul 29 16:17:39 2011 -0400
Passed nulls test.
---
lib/pyld/jsonld.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py
index 21cbc59..a81d779 100644
--- a/lib/pyld/jsonld.py
+++ b/lib/pyld/jsonld.py
@@ -630,12 +630,14 @@ def _collectSubjects(input, subjects, bnodes):
# @param subjects the map of subjects to write to.
def _flatten(parent, parentProperty, value, subjects):
flattened = None
-
- if isinstance(value, list):
+
+ if value is None:
+ # drop null values
+ pass
+ elif isinstance(value, list):
# list of objects or a disjoint graph
for i in value:
_flatten(parent, parentProperty, i, subjects)
-
elif isinstance(value, dict):
# graph literal/disjoint graph
if _s in value and isinstance(value[_s], list):
--
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