This remove unused keyword
--line, and those below, will be ignored-- M socks5.py M connection_handlers.py
This commit is contained in:
parent
124f1c641e
commit
470e668ea2
|
@ -175,7 +175,7 @@ class ConnectionBytestream:
|
|||
except socket.gaierror:
|
||||
self.dispatch('ERROR', (_('Wrong host'), _('The host you configured as the ft_override_host_to_send advanced option is not valid, so ignored.')))
|
||||
ft_override_host_to_send = self.peerhost[0]
|
||||
listener = gajim.socks5queue.start_listener(self.peerhost[0], port,
|
||||
listener = gajim.socks5queue.start_listener(port,
|
||||
sha_str, self._result_socks5_sid, file_props['sid'])
|
||||
if listener == None:
|
||||
file_props['error'] = -5
|
||||
|
|
|
@ -74,13 +74,13 @@ class SocksQueue:
|
|||
self.on_success = None
|
||||
self.on_failure = None
|
||||
|
||||
def start_listener(self, host, port, sha_str, sha_handler, sid):
|
||||
def start_listener(self, port, sha_str, sha_handler, sid):
|
||||
''' start waiting for incomming connections on (host, port)
|
||||
and do a socks5 authentication using sid for generated sha
|
||||
'''
|
||||
self.sha_handlers[sha_str] = (sha_handler, sid)
|
||||
if self.listener == None:
|
||||
self.listener = Socks5Listener(self.idlequeue, host, port)
|
||||
self.listener = Socks5Listener(self.idlequeue, port)
|
||||
self.listener.queue = self
|
||||
self.listener.bind()
|
||||
if self.listener.started is False:
|
||||
|
@ -790,12 +790,12 @@ class Socks5Sender(Socks5, IdleObject):
|
|||
self.queue.remove_sender(self.queue_idx, False)
|
||||
|
||||
class Socks5Listener(IdleObject):
|
||||
def __init__(self, idlequeue, host, port):
|
||||
''' handle all incomming connections on (host, port)
|
||||
def __init__(self, idlequeue, port):
|
||||
''' handle all incomming connections on (0.0.0.0, port)
|
||||
This class implements IdleObject, but we will expect
|
||||
only pollin events though
|
||||
'''
|
||||
self.host, self.port = host, port
|
||||
self.port = port
|
||||
self.queue_idx = -1
|
||||
self.idlequeue = idlequeue
|
||||
self.queue = None
|
||||
|
|
Loading…
Reference in New Issue