diff options
author | Andrew Resch <andrewresch@gmail.com> | 2016-10-16 18:18:47 -0700 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2016-10-26 09:53:32 +0100 |
commit | 8b50f3cdbdec4f2fa622aca9d0e4b45e5e4bf3aa (patch) | |
tree | 925d1168e6bc3211787c288b9091cb909dda223b /deluge/ui/client.py | |
parent | 16da4d851e68c93e4c41c1133192b9f6447a6cd5 (diff) | |
download | deluge-8b50f3cdbdec4f2fa622aca9d0e4b45e5e4bf3aa.tar.gz deluge-8b50f3cdbdec4f2fa622aca9d0e4b45e5e4bf3aa.tar.bz2 deluge-8b50f3cdbdec4f2fa622aca9d0e4b45e5e4bf3aa.zip |
[Py2to3] Clean-up the use of keys() on dictionary objects.
To make the code more Python 3 compatible, I've made a few changes to how we handle keys() or iterkeys() calls on dictionaries. All functionality should remain the same.
* Remove the use of .keys() or .iterkeys() when iterating through a dictionary.
* Remove the use of .keys() when checking if key exists in dictionary.
* Replace dict.keys() with list(dict) to obtain a list of dictionary keys. In Python 3 dict.keys() returns a dict_keys object, not a list.
Diffstat (limited to 'deluge/ui/client.py')
-rw-r--r-- | deluge/ui/client.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/deluge/ui/client.py b/deluge/ui/client.py index 1bcd92bf2..994795b01 100644 --- a/deluge/ui/client.py +++ b/deluge/ui/client.py @@ -394,7 +394,7 @@ class DaemonSSLProxy(DaemonProxy): # We need to tell the daemon what events we're interested in receiving if self.__factory.event_handlers: self.call("daemon.set_event_interest", - self.__factory.event_handlers.keys()) + list(self.__factory.event_handlers)) self.call("core.get_auth_levels_mappings").addCallback( self.__on_auth_levels_mappings |