TorManager: correct the Tor error log message

On Linux, there is no self-bundled Tor, so the message was not correct
because it was stating that self-bundled Tor was being started.
This commit is contained in:
redfish 2018-08-02 23:47:24 +00:00
parent 4c62840cef
commit 9bd10d5102
1 changed files with 4 additions and 1 deletions

View File

@ -66,7 +66,10 @@ class TorManager(object):
raise Exception("No connection")
self.log.debug("Tor proxy port %s check ok" % config.tor_proxy)
except Exception, err:
self.log.info(u"Starting self-bundled Tor, due to Tor proxy port %s check error: %s" % (config.tor_proxy, err))
if sys.platform.startswith("win"):
self.log.info(u"Starting self-bundled Tor, due to Tor proxy port %s check error: %s" % (config.tor_proxy, err))
else:
self.log.info(u"Disabling Tor, because error while accessing Tor proxy at port %s: %s" % (config.tor_proxy, err))
self.enabled = False
# Change to self-bundled Tor ports
from lib.PySocks import socks