From 9a25e6b21d1853097bf7f6ccdd754a2c2775671c Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Sat, 29 Aug 2015 07:48:06 -0400 Subject: [PATCH] tor: Add torsocks as required package, needed for diagnostics. Display error for diagnostic if command is missing. --- plinth/action_utils.py | 2 ++ plinth/modules/tor/tor.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plinth/action_utils.py b/plinth/action_utils.py index 78108dbcf..b9a673dab 100644 --- a/plinth/action_utils.py +++ b/plinth/action_utils.py @@ -268,6 +268,8 @@ def diagnose_url(url, kind=None, env=None, extra_options=None, wrapper=None, # Authorization failed is a success if exception.returncode == 6: result = 'passed' + except FileNotFoundError: + result = 'error: missing command' if kind: return [_('Access URL {url} on tcp{kind}') diff --git a/plinth/modules/tor/tor.py b/plinth/modules/tor/tor.py index 5fae309df..628f437dd 100644 --- a/plinth/modules/tor/tor.py +++ b/plinth/modules/tor/tor.py @@ -55,7 +55,7 @@ def on_install(): actions.superuser_run('tor', ['setup']) -@package.required(['tor', 'obfsproxy'], on_install=on_install) +@package.required(['tor', 'obfsproxy', 'torsocks'], on_install=on_install) def index(request): """Service the index page""" status = get_status()