don't use mutable arguments as default value. Fixes #7971
This commit is contained in:
parent
28c1fac86d
commit
a21f6ba561
|
@ -919,7 +919,7 @@ class Socks5Sender(IdleObject):
|
||||||
Class for sending file to socket over socks5
|
Class for sending file to socket over socks5
|
||||||
"""
|
"""
|
||||||
def __init__(self, idlequeue, sock_hash, parent, _sock, host=None,
|
def __init__(self, idlequeue, sock_hash, parent, _sock, host=None,
|
||||||
port=None, fingerprint = None, connected=True, file_props={}):
|
port=None, fingerprint = None, connected=True, file_props=None):
|
||||||
self.fingerprint = fingerprint
|
self.fingerprint = fingerprint
|
||||||
self.queue_idx = sock_hash
|
self.queue_idx = sock_hash
|
||||||
self.queue = parent
|
self.queue = parent
|
||||||
|
@ -1331,7 +1331,7 @@ class Socks5Client(Socks5):
|
||||||
class Socks5SenderClient(Socks5Client, Socks5Sender):
|
class Socks5SenderClient(Socks5Client, Socks5Sender):
|
||||||
|
|
||||||
def __init__(self, idlequeue, sock_hash, parent,_sock, host=None,
|
def __init__(self, idlequeue, sock_hash, parent,_sock, host=None,
|
||||||
port=None, fingerprint = None, connected=True, file_props={}):
|
port=None, fingerprint = None, connected=True, file_props=None):
|
||||||
Socks5Client.__init__(self, idlequeue, host, port, None, None,
|
Socks5Client.__init__(self, idlequeue, host, port, None, None,
|
||||||
file_props.sid)
|
file_props.sid)
|
||||||
Socks5Sender.__init__(self,idlequeue, sock_hash, parent,_sock,
|
Socks5Sender.__init__(self,idlequeue, sock_hash, parent,_sock,
|
||||||
|
@ -1341,7 +1341,7 @@ class Socks5SenderClient(Socks5Client, Socks5Sender):
|
||||||
class Socks5SenderServer(Socks5Server, Socks5Sender):
|
class Socks5SenderServer(Socks5Server, Socks5Sender):
|
||||||
|
|
||||||
def __init__(self, idlequeue, sock_hash, parent,_sock, host=None,
|
def __init__(self, idlequeue, sock_hash, parent,_sock, host=None,
|
||||||
port=None, fingerprint = None, connected=True, file_props={}):
|
port=None, fingerprint = None, connected=True, file_props=None):
|
||||||
Socks5Server.__init__(self, idlequeue, host, port, None, None,
|
Socks5Server.__init__(self, idlequeue, host, port, None, None,
|
||||||
file_props.sid)
|
file_props.sid)
|
||||||
Socks5Sender.__init__(self,idlequeue, sock_hash, parent, _sock,
|
Socks5Sender.__init__(self,idlequeue, sock_hash, parent, _sock,
|
||||||
|
@ -1349,7 +1349,7 @@ class Socks5SenderServer(Socks5Server, Socks5Sender):
|
||||||
|
|
||||||
|
|
||||||
class Socks5ReceiverClient(Socks5Client, Socks5Receiver):
|
class Socks5ReceiverClient(Socks5Client, Socks5Receiver):
|
||||||
def __init__(self, idlequeue, streamhost, sid, file_props = None,
|
def __init__(self, idlequeue, streamhost, sid, file_props=None,
|
||||||
fingerprint=None):
|
fingerprint=None):
|
||||||
Socks5Client.__init__(self, idlequeue, streamhost['host'],
|
Socks5Client.__init__(self, idlequeue, streamhost['host'],
|
||||||
int(streamhost['port']), streamhost['initiator'],
|
int(streamhost['port']), streamhost['initiator'],
|
||||||
|
@ -1360,7 +1360,7 @@ class Socks5ReceiverClient(Socks5Client, Socks5Receiver):
|
||||||
|
|
||||||
class Socks5ReceiverServer(Socks5Server, Socks5Receiver):
|
class Socks5ReceiverServer(Socks5Server, Socks5Receiver):
|
||||||
|
|
||||||
def __init__(self, idlequeue, streamhost, sid, file_props = None,
|
def __init__(self, idlequeue, streamhost, sid, file_props=None,
|
||||||
fingerprint=None):
|
fingerprint=None):
|
||||||
Socks5Server.__init__(self, idlequeue, streamhost['host'],
|
Socks5Server.__init__(self, idlequeue, streamhost['host'],
|
||||||
int(streamhost['port']), streamhost['initiator'],
|
int(streamhost['port']), streamhost['initiator'],
|
||||||
|
|
|
@ -128,7 +128,7 @@ class ZeroconfListener(IdleObject):
|
||||||
return _sock
|
return _sock
|
||||||
|
|
||||||
class P2PClient(IdleObject):
|
class P2PClient(IdleObject):
|
||||||
def __init__(self, _sock, host, port, conn_holder, stanzaqueue=[], to=None,
|
def __init__(self, _sock, host, port, conn_holder, stanzaqueue, to=None,
|
||||||
on_ok=None, on_not_ok=None):
|
on_ok=None, on_not_ok=None):
|
||||||
self._owner = self
|
self._owner = self
|
||||||
self.Namespace = 'jabber:client'
|
self.Namespace = 'jabber:client'
|
||||||
|
|
Loading…
Reference in New Issue