Fix tor status logging with foreign languages
This commit is contained in:
parent
13019941b3
commit
24a7c26819
1 changed files with 3 additions and 3 deletions
|
@ -105,7 +105,7 @@ class TorManager(object):
|
||||||
# Terminate on exit
|
# Terminate on exit
|
||||||
atexit.register(self.stopTor)
|
atexit.register(self.stopTor)
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
self.log.error("Error starting Tor client: %s" % Debug.formatException(err))
|
self.log.error(u"Error starting Tor client: %s" % Debug.formatException(str(err).decode("utf8", "ignore")))
|
||||||
self.enabled = False
|
self.enabled = False
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -206,8 +206,8 @@ class TorManager(object):
|
||||||
self.conn = conn
|
self.conn = conn
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
self.conn = None
|
self.conn = None
|
||||||
self.setStatus(u"Error (%s)" % err)
|
self.setStatus(u"Error (%s)" % str(err).decode("utf8", "ignore"))
|
||||||
self.log.warning("Tor controller connect error: %s" % Debug.formatException(err))
|
self.log.warning(u"Tor controller connect error: %s" % Debug.formatException(str(err).decode("utf8", "ignore")))
|
||||||
self.enabled = False
|
self.enabled = False
|
||||||
return self.conn
|
return self.conn
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue