don't use mutable arguments as default value. Fixes #7971

This commit is contained in:
Yann Leboulanger 2015-02-16 12:55:10 +01:00
parent 28c1fac86d
commit a21f6ba561
2 changed files with 6 additions and 6 deletions

View File

@ -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,

View File

@ -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'