From 92adce255d9ada0fc274585ed675e2a1cdee4411 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 7 Aug 2023 09:46:52 +0100 Subject: [PATCH] Another user path --- pyjsonld.py | 5 +++-- utils.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pyjsonld.py b/pyjsonld.py index 17b6df9d1..e800a1fca 100644 --- a/pyjsonld.py +++ b/pyjsonld.py @@ -2396,13 +2396,14 @@ class JsonLdProcessor(object): # hash bnode paths path_namer = UniqueNamer('_:b') path_namer.get_name(bnode) + bnode_path = None try: bnode_path = self._hash_paths( bnode, bnodes, namer, path_namer) - results.append(bnode_path) except BaseException: print('WARN: jsonld bnode_path failed') - pass + if bnode_path: + results.append(bnode_path) # name bnodes in hash order cmp_hashes = cmp_to_key(lambda x, y: cmp(x['hash'], y['hash'])) diff --git a/utils.py b/utils.py index a831318ff..688b1624e 100644 --- a/utils.py +++ b/utils.py @@ -1472,7 +1472,7 @@ def get_user_paths() -> []: return ('/users/', '/profile/', '/accounts/', '/channel/', '/u/', '/c/', '/m/', '/video-channels/', '/author/', '/activitypub/', '/actors/', '/snac/', '/@/', '/~/', - '/fediverse/blog/') + '/fediverse/blog/', '/user/') def get_group_paths() -> []: