proxyconfig_stem quality fixes

This commit is contained in:
lakshyacis 2019-12-21 12:45:29 +05:30
parent ea50485de2
commit e24f4de40e
No known key found for this signature in database
GPG Key ID: D2C539C8EC63E9EB
1 changed files with 5 additions and 4 deletions

View File

@ -22,9 +22,8 @@ import stem.process
import stem.version
class DebugLogger(object):
class DebugLogger(object): # pylint: disable=too-few-public-methods
"""Safe logger wrapper for tor and plugin's logs"""
# pylint: disable=too-few-public-methods
def __init__(self):
self._logger = logging.getLogger('default')
self._levels = {
@ -108,7 +107,8 @@ def connect_plugin(config): # pylint: disable=too-many-branches
onionhostname = config.safeGet('bitmessagesettings', 'onionhostname')
onionkey = config.safeGet(onionhostname, 'privsigningkey')
if onionhostname and not onionkey:
logwrite('The hidden service found in config ): %s' % onionhostname)
logwrite('The hidden service found in config ): %s' %
onionhostname)
onionkeytype = config.safeGet(onionhostname, 'keytype')
response = controller.create_ephemeral_hidden_service(
@ -124,7 +124,8 @@ def connect_plugin(config): # pylint: disable=too-many-branches
if not onionkey:
logwrite('Started hidden service %s.onion' % response.service_id)
# only save new service keys if onionhostname was not set previously
# only save new service keys
# if onionhostname was not set previously
if not onionhostname:
onionhostname = response.service_id + '.onion'
config.set(