summaryrefslogtreecommitdiffstats
path: root/deluge/ui/web/auth.py
diff options
context:
space:
mode:
authorAndrew Resch <andrewresch@gmail.com>2016-10-16 18:18:47 -0700
committerCalum Lind <calumlind+deluge@gmail.com>2016-10-26 09:53:32 +0100
commit8b50f3cdbdec4f2fa622aca9d0e4b45e5e4bf3aa (patch)
tree925d1168e6bc3211787c288b9091cb909dda223b /deluge/ui/web/auth.py
parent16da4d851e68c93e4c41c1133192b9f6447a6cd5 (diff)
downloaddeluge-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/web/auth.py')
-rw-r--r--deluge/ui/web/auth.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/deluge/ui/web/auth.py b/deluge/ui/web/auth.py
index ae6b11da5..57416bfec 100644
--- a/deluge/ui/web/auth.py
+++ b/deluge/ui/web/auth.py
@@ -90,7 +90,7 @@ class Auth(JSONComponent):
self.worker.stop()
def _clean_sessions(self):
- session_ids = self.config["sessions"].keys()
+ session_ids = list(self.config["sessions"])
now = time.gmtime()
for session_id in session_ids: