From 9a0a9f11b2b39ca3d794d285f72943ce50847264 Mon Sep 17 00:00:00 2001 From: Kevin F Date: Mon, 23 Jan 2023 17:54:28 -0600 Subject: [PATCH] Give a friendly error message when the Tor plugin starts up without Tor being in path --- static-data/official-plugins/tor/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static-data/official-plugins/tor/main.py b/static-data/official-plugins/tor/main.py index 26973476..3ba5e4d4 100644 --- a/static-data/official-plugins/tor/main.py +++ b/static-data/official-plugins/tor/main.py @@ -71,7 +71,11 @@ def on_get_our_transport(api, data=None): def on_gossip_start(api, data: Set[Peer] = None): # We don't do gossip logic - starttor.start_tor() + try: + starttor.start_tor() + except OSError: + logging.error("Tor is not in your path. Install a recent version of Tor and try again.") + return with Controller.from_socket_file(control_socket) as controller: controller