[tor-commits] [arm/release] Adding tor check for setup wizard
atagar at torproject.org
atagar at torproject.org
Sun Jul 17 06:08:32 UTC 2011
commit 5b60d326a68b28f925c4c1f7b2789f179ea9e582
Author: Damian Johnson <atagar at torproject.org>
Date: Sun Jul 10 23:56:18 2011 -0700
Adding tor check for setup wizard
If tor isn't available in the PATH then gives a warning.
---
src/cli/wizard.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/cli/wizard.py b/src/cli/wizard.py
index 0f35247..f796e41 100644
--- a/src/cli/wizard.py
+++ b/src/cli/wizard.py
@@ -16,7 +16,7 @@ import cli.controller
from TorCtl import TorCtl
-from util import connections, enum, log, torConfig, torTools, uiTools
+from util import connections, enum, log, sysTools, torConfig, torTools, uiTools
# template used to generate the torrc
TORRC_TEMPLATE = "resources/torrcTemplate.txt"
@@ -227,6 +227,11 @@ def showWizard():
instance.
"""
+ if not sysTools.isAvailable("tor"):
+ msg = "Unable to run the setup wizard. Is tor installed?"
+ log.log(log.WARN, msg)
+ return
+
relayType, config = None, {}
for option in Options.values():
if option == Options.DIVIDER:
More information about the tor-commits
mailing list