Give a friendly error message when the Tor plugin starts up without Tor being in path

This commit is contained in:
Kevin F 2023-01-23 17:54:28 -06:00
parent f410f033c0
commit 9a0a9f11b2
1 changed files with 5 additions and 1 deletions

View File

@ -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