mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-13 13:05:37 +00:00
Fix #1945 : Mutable default arguments in deluge.ui.client
This commit is contained in:
parent
07d4aff13b
commit
2a3d8ae156
@ -18,9 +18,9 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with deluge. If not, write to:
|
# along with deluge. If not, write to:
|
||||||
# The Free Software Foundation, Inc.,
|
# The Free Software Foundation, Inc.,
|
||||||
# 51 Franklin Street, Fifth Floor
|
# 51 Franklin Street, Fifth Floor
|
||||||
# Boston, MA 02110-1301, USA.
|
# Boston, MA 02110-1301, USA.
|
||||||
#
|
#
|
||||||
# In addition, as a special exception, the copyright holders give
|
# In addition, as a special exception, the copyright holders give
|
||||||
# permission to link the code of portions of this program with the OpenSSL
|
# permission to link the code of portions of this program with the OpenSSL
|
||||||
@ -266,7 +266,9 @@ class DaemonProxy(object):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
class DaemonSSLProxy(DaemonProxy):
|
class DaemonSSLProxy(DaemonProxy):
|
||||||
def __init__(self, event_handlers={}):
|
def __init__(self, event_handlers=None):
|
||||||
|
if event_handlers is None:
|
||||||
|
event_handlers = {}
|
||||||
self.__factory = DelugeRPCClientFactory(self, event_handlers)
|
self.__factory = DelugeRPCClientFactory(self, event_handlers)
|
||||||
self.__request_counter = 0
|
self.__request_counter = 0
|
||||||
self.__deferred = {}
|
self.__deferred = {}
|
||||||
@ -466,7 +468,9 @@ class DaemonSSLProxy(DaemonProxy):
|
|||||||
return self.__factory.bytes_sent
|
return self.__factory.bytes_sent
|
||||||
|
|
||||||
class DaemonClassicProxy(DaemonProxy):
|
class DaemonClassicProxy(DaemonProxy):
|
||||||
def __init__(self, event_handlers={}):
|
def __init__(self, event_handlers=None):
|
||||||
|
if event_handlers is None:
|
||||||
|
event_handlers = {}
|
||||||
import deluge.core.daemon
|
import deluge.core.daemon
|
||||||
self.__daemon = deluge.core.daemon.Daemon(classic=True)
|
self.__daemon = deluge.core.daemon.Daemon(classic=True)
|
||||||
log.debug("daemon created!")
|
log.debug("daemon created!")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user