[Python-modules-commits] [python-pyld] 179/276: Use remote doc documentUrl as base.

Wolfgang Borgert debacle at moszumanska.debian.org
Wed Oct 8 23:48:08 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 9972e43089eed29c016bbbabbc4d96cce9ebcd28
Author: Dave Longley <dlongley at digitalbazaar.com>
Date:   Mon Sep 9 23:39:28 2013 -0400

    Use remote doc documentUrl as base.
---
 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 da4a9ba..1e76fdd 100644
--- a/lib/pyld/jsonld.py
+++ b/lib/pyld/jsonld.py
@@ -559,7 +559,6 @@ class JsonLdProcessor:
         """
         # set default options
         options = options or {}
-        options.setdefault('base', input_ if _is_string(input_) else '')
         options.setdefault('keepFreeFloatingNodes', False)
         options.setdefault('documentLoader', _default_document_loader)
 
@@ -587,6 +586,9 @@ class JsonLdProcessor:
                  {'remoteDoc': remote_doc}, code='loading document failed',
                  cause=cause)
 
+        # set default base
+        options.setdefault('base', remote_doc['documentUrl'] or '')
+
         # build meta-object and retrieve all @context urls
         input_ = {
             'document': copy.deepcopy(remote_doc['document']),

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