From a19822ce5af48e0dc73a098372353b532b2ec8b6 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 14 Mar 2021 18:14:18 +0000 Subject: [PATCH] Handle exception in jsonld signature check --- pyjsonld.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pyjsonld.py b/pyjsonld.py index 36b44d0bb..6bdfd78c5 100644 --- a/pyjsonld.py +++ b/pyjsonld.py @@ -2378,8 +2378,13 @@ class JsonLdProcessor(object): # hash bnode paths path_namer = UniqueNamer('_:b') path_namer.get_name(bnode) - results.append(self._hash_paths( - bnode, bnodes, namer, path_namer)) + try: + bnode_path = self._hash_paths( + bnode, bnodes, namer, path_namer) + results.append(bnode_path) + except BaseException: + print('WARN: jsonld bnode_path failed') + pass # name bnodes in hash order cmp_hashes = cmp_to_key(lambda x, y: cmp(x['hash'], y['hash']))