Skip to content

Commit f9750d7

Browse files
committed
Start 0.7.4.
1 parent 012c105 commit f9750d7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/pyld/jsonld.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def __ne__(self, other):
6565
__hash__ = None
6666
return K
6767

68-
# support python 2
68+
# support python 2 and 3
6969
if sys.version_info[0] >= 3:
7070
from urllib.request import build_opener as urllib_build_opener
7171
from urllib.request import HTTPSHandler
@@ -83,7 +83,7 @@ def cmp(a, b):
8383

8484
__copyright__ = 'Copyright (c) 2011-2017 Digital Bazaar, Inc.'
8585
__license__ = 'New BSD license'
86-
__version__ = '0.7.3'
86+
__version__ = '0.7.4-dev'
8787

8888
__all__ = [
8989
'compact', 'expand', 'flatten', 'frame', 'link', 'from_rdf', 'to_rdf',
@@ -383,10 +383,13 @@ def load_document(url):
383383
'jsonld.InvalidUrl', {'url': url},
384384
code='loading document failed')
385385
https_handler = VerifiedHTTPSHandler()
386+
#https_handler = HTTPSHandler()
386387
url_opener = urllib_build_opener(https_handler)
387388
url_opener.addheaders = [
388389
('Accept', 'application/ld+json, application/json'),
389390
('Accept-Encoding', 'deflate')]
391+
392+
print('URLGO', url)
390393
with closing(url_opener.open(url)) as handle:
391394
content_encoding = handle.info().get('Content-Encoding', '')
392395
if content_encoding == 'gzip':
@@ -424,6 +427,7 @@ def load_document(url):
424427
except JsonLdError as e:
425428
raise e
426429
except Exception as cause:
430+
print('URLERR', url)
427431
raise JsonLdError(
428432
'Could not retrieve a JSON-LD document from the URL.',
429433
'jsonld.LoadDocumentError', code='loading document failed',

0 commit comments

Comments
 (0)