summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2011-11-25 14:18:45 +0000
committerCalum Lind <calumlind+deluge@gmail.com>2011-11-29 19:10:53 +0000
commit2a3d8ae15681ae5a66977f99cb6ba5ce860c981c (patch)
tree03195f6d1ddab928d0a86708ab914144b28be949
parent07d4aff13b8dc68a3df0a2a744ba171b7c80648d (diff)
downloaddeluge-2a3d8ae15681ae5a66977f99cb6ba5ce860c981c.zip
deluge-2a3d8ae15681ae5a66977f99cb6ba5ce860c981c.tar.gz
deluge-2a3d8ae15681ae5a66977f99cb6ba5ce860c981c.tar.bz2
Fix #1945 : Mutable default arguments in deluge.ui.client
-rw-r--r--deluge/ui/client.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/deluge/ui/client.py b/deluge/ui/client.py
index 269da60..2ea2d3b 100644
--- a/deluge/ui/client.py
+++ b/deluge/ui/client.py
@@ -18,9 +18,9 @@
#
# You should have received a copy of the GNU General Public License
# along with deluge. If not, write to:
-# The Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor
-# Boston, MA 02110-1301, USA.
+# The Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor
+# Boston, MA 02110-1301, USA.
#
# In addition, as a special exception, the copyright holders give
# permission to link the code of portions of this program with the OpenSSL
@@ -266,7 +266,9 @@ class DaemonProxy(object):
pass
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.__request_counter = 0
self.__deferred = {}
@@ -466,7 +468,9 @@ class DaemonSSLProxy(DaemonProxy):
return self.__factory.bytes_sent
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
self.__daemon = deluge.core.daemon.Daemon(classic=True)
log.debug("daemon created!")