summaryrefslogtreecommitdiffstats
path: root/deluge/ui/common.py
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2017-02-24 18:28:33 +0000
committerCalum Lind <calumlind+deluge@gmail.com>2017-03-16 23:20:56 +0000
commiteb38e0ffff42c5862105b9f4138dc615aff57af8 (patch)
tree110a4de6c6e9a6fd1052ff44b35abaa869cc5bb5 /deluge/ui/common.py
parent321677e05a7d24e3a0c76012b588671a03bdac54 (diff)
downloaddeluge-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/common.py')
-rw-r--r--deluge/ui/common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/deluge/ui/common.py b/deluge/ui/common.py
index cc5b92838..8c7eb314e 100644
--- a/deluge/ui/common.py
+++ b/deluge/ui/common.py
@@ -207,7 +207,7 @@ class TorrentInfo(object):
item.update(paths[path])
item['download'] = True
- file_tree = FileTree2(paths.keys())
+ file_tree = FileTree2(list(paths.keys()))
file_tree.walk(walk)
else:
def walk(path, item):