Rev4208, Add details on Tor connection error

This commit is contained in:
shortcutme 2019-09-10 15:43:42 +02:00
parent e6b8097b43
commit 2de35266c4
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 3 additions and 2 deletions

View file

@ -13,7 +13,7 @@ class Config(object):
def __init__(self, argv): def __init__(self, argv):
self.version = "0.7.1" self.version = "0.7.1"
self.rev = 4206 self.rev = 4208
self.argv = argv self.argv = argv
self.action = None self.action = None
self.pending_changes = {} self.pending_changes = {}

View file

@ -38,6 +38,7 @@ class TorManager(object):
self.lock = RLock() self.lock = RLock()
self.starting = True self.starting = True
self.connecting = True self.connecting = True
self.status = None
self.event_started = gevent.event.AsyncResult() self.event_started = gevent.event.AsyncResult()
if config.tor == "disable": if config.tor == "disable":
@ -64,7 +65,7 @@ class TorManager(object):
self.starting = True self.starting = True
try: try:
if not self.connect(): if not self.connect():
raise Exception("No connection") raise Exception(self.status)
self.log.debug("Tor proxy port %s check ok" % config.tor_proxy) self.log.debug("Tor proxy port %s check ok" % config.tor_proxy)
except Exception as err: except Exception as err:
if sys.platform.startswith("win") and os.path.isfile(self.tor_exe): if sys.platform.startswith("win") and os.path.isfile(self.tor_exe):