Make CLI throw an error if it cannot find tor binary

This commit is contained in:
Micah Lee 2020-11-29 11:08:46 -08:00
parent 7bcfe6cad1
commit aecaae896d
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
3 changed files with 20 additions and 21 deletions

View file

@ -32,7 +32,6 @@ import getpass
import psutil
from distutils.version import LooseVersion as Version
from . import common
from .settings import Settings
# TODO: Figure out how to localize this for the GUI
@ -44,40 +43,30 @@ class TorErrorAutomatic(Exception):
using automatic settings that should work with Tor Browser.
"""
pass
class TorErrorInvalidSetting(Exception):
"""
This exception is raised if the settings just don't make sense.
"""
pass
class TorErrorSocketPort(Exception):
"""
OnionShare can't connect to the Tor controller using the supplied address and port.
"""
pass
class TorErrorSocketFile(Exception):
"""
OnionShare can't connect to the Tor controller using the supplied socket file.
"""
pass
class TorErrorMissingPassword(Exception):
"""
OnionShare connected to the Tor controller, but it requires a password.
"""
pass
class TorErrorUnreadableCookieFile(Exception):
"""
@ -85,8 +74,6 @@ class TorErrorUnreadableCookieFile(Exception):
to access the cookie file.
"""
pass
class TorErrorAuthError(Exception):
"""
@ -94,8 +81,6 @@ class TorErrorAuthError(Exception):
that a Tor controller isn't listening on this port.
"""
pass
class TorErrorProtocolError(Exception):
"""
@ -103,8 +88,6 @@ class TorErrorProtocolError(Exception):
isn't acting like a Tor controller (such as in Whonix).
"""
pass
class TorTooOld(Exception):
"""
@ -113,8 +96,6 @@ class TorTooOld(Exception):
is too old.
"""
pass
class BundledTorTimeout(Exception):
"""