proxyconfig_stem pylint fixes
This commit is contained in:
parent
e50f99419f
commit
df1994d6f3
|
@ -1,5 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
"""
|
||||||
|
src/plugins/proxyconfig_stem.py
|
||||||
|
===================================
|
||||||
|
"""
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
import random # noseq
|
import random # noseq
|
||||||
|
@ -29,14 +32,14 @@ class DebugLogger(object):
|
||||||
# Plugin's debug or unexpected log line from tor
|
# Plugin's debug or unexpected log line from tor
|
||||||
self._logger.debug(line)
|
self._logger.debug(line)
|
||||||
else:
|
else:
|
||||||
self._logger.log(self._levels.get(level, 10), '(tor)' + line)
|
self._logger.log(self._levels.get(level, 10), '(tor) %s', line)
|
||||||
|
|
||||||
|
|
||||||
def connect_plugin(config): # pylint: disable=too-many-branches
|
def connect_plugin(config): # pylint: disable=too-many-branches
|
||||||
"""Run stem proxy configurator"""
|
"""Run stem proxy configurator"""
|
||||||
logwrite = DebugLogger()
|
logwrite = DebugLogger()
|
||||||
if config.safeGet('bitmessagesettings', 'sockshostname') not in (
|
if config.safeGet('bitmessagesettings', 'sockshostname') not in (
|
||||||
'localhost', '127.0.0.1', ''
|
'localhost', '127.0.0.1', ''
|
||||||
):
|
):
|
||||||
# remote proxy is choosen for outbound connections,
|
# remote proxy is choosen for outbound connections,
|
||||||
# nothing to do here, but need to set socksproxytype to SOCKS5!
|
# nothing to do here, but need to set socksproxytype to SOCKS5!
|
||||||
|
|
Reference in New Issue
Block a user