WIP: Handling a new pylint design checker message #17

Draft
lee.miller wants to merge 4 commits from lee.miller/MiNode:lint into v0.3
2 changed files with 6 additions and 8 deletions
Showing only changes of commit 09c0736817 - Show all commits

View File

@ -7,14 +7,15 @@ from .util import I2PThread
class I2PDialer(I2PThread):
def __init__(
self, state, destination, nick, sam_host='127.0.0.1', sam_port=7656
self, state, destination, nick=None, *, sam_host=None, sam_port=None
):
self.sam_host = sam_host
self.sam_port = sam_port
# Initially 127.0.0.1:7656
self.sam_host = sam_host or state.i2p_sam_host
self.sam_port = sam_port or state.i2p_sam_port
self.nick = nick
self.destination = destination
self.nick = nick or state.i2p_session_nick
super().__init__(state, name='I2P Dial to {}'.format(self.destination))

View File

@ -156,10 +156,7 @@ class Manager(threading.Thread):
if port == 'i2p' and shared.i2p_enabled:
if shared.i2p_session_nick and host != shared.i2p_dest_pub:
try:
d = I2PDialer(
shared,
host, shared.i2p_session_nick,
shared.i2p_sam_host, shared.i2p_sam_port)
d = I2PDialer(shared, host)
d.start()
hosts.add(d.destination)
shared.i2p_dialers.add(d)