From 560a20e90abfa7b5b6d4b45de3052b56ffd2d750 Mon Sep 17 00:00:00 2001 From: Kevin F Date: Mon, 16 Jan 2023 23:30:50 -0600 Subject: [PATCH] Only expose wot to rpc if rpc is active --- static-data/official-plugins/wot/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static-data/official-plugins/wot/main.py b/static-data/official-plugins/wot/main.py index 26011361..d520cadf 100644 --- a/static-data/official-plugins/wot/main.py +++ b/static-data/official-plugins/wot/main.py @@ -66,7 +66,11 @@ def on_init(api, data=None): load_identities_from_blocks()) ) - plugin_apis['rpc.add_module_to_api'](wot) + # Expose WOT to RPC if the RPC plugin is loaded + try: + plugin_apis['rpc.add_module_to_api'](wot) + except KeyError: + pass # load active identity, from there load our trust graph active_identity = config.get('wot.active_identity_name', '')