diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2017-02-24 18:28:33 +0000 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2017-03-16 23:20:56 +0000 |
commit | eb38e0ffff42c5862105b9f4138dc615aff57af8 (patch) | |
tree | 110a4de6c6e9a6fd1052ff44b35abaa869cc5bb5 /deluge/ui/web/auth.py | |
parent | 321677e05a7d24e3a0c76012b588671a03bdac54 (diff) | |
download | deluge-eb38e0ffff42c5862105b9f4138dc615aff57af8.tar.gz deluge-eb38e0ffff42c5862105b9f4138dc615aff57af8.tar.bz2 deluge-eb38e0ffff42c5862105b9f4138dc615aff57af8.zip |
[Py2to3] Large set of changes for Python 3 compat
- Preparation work for using six or future module for Py2/3 compat. The
code will be written in Python 3 with Python 2 fallbacks.
- Added some Py3 imports with Py2 fallbacks to make it easier to remove
Py2 code in future.
- Replace xrange with range (sort out import as top of files in future).
- Workaround Py2to3 basestring issue with inline if in instances. This means
every usage of basestring is more considered.
- Replace iteritems and itervalues for items and values. There might be a
performance penalty on Py2 so might need to revisit this change.
Diffstat (limited to 'deluge/ui/web/auth.py')
-rw-r--r-- | deluge/ui/web/auth.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/deluge/ui/web/auth.py b/deluge/ui/web/auth.py index d5a439d42..4438004f6 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'].keys()) now = time.gmtime() for session_id in session_ids: |