summaryrefslogtreecommitdiffstats
path: root/deluge/ui/common.py
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2016-10-26 19:14:10 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2016-10-26 19:14:10 +0100
commit3f72905b3fb66549e572df9acaeb27cf0d93fe05 (patch)
tree83e2ea501256392a95e3148de5a03018037e7f62 /deluge/ui/common.py
parentc4282f29abbd1812c5d91343561886129751390c (diff)
downloaddeluge-3f72905b3fb66549e572df9acaeb27cf0d93fe05.tar.gz
deluge-3f72905b3fb66549e572df9acaeb27cf0d93fe05.tar.bz2
deluge-3f72905b3fb66549e572df9acaeb27cf0d93fe05.zip
Revert "[Py2to3] Clean-up the use of keys() on dictionary objects."
This reverts commit 8b50f3cdbdec4f2fa622aca9d0e4b45e5e4bf3aa.
Diffstat (limited to 'deluge/ui/common.py')
-rw-r--r--deluge/ui/common.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/deluge/ui/common.py b/deluge/ui/common.py
index ddcd7574a..94e531d2d 100644
--- a/deluge/ui/common.py
+++ b/deluge/ui/common.py
@@ -134,7 +134,7 @@ class TorrentInfo(object):
item.update(paths[path])
item["download"] = True
- file_tree = FileTree2(list(paths))
+ file_tree = FileTree2(paths.keys())
file_tree.walk(walk)
else:
def walk(path, item):
@@ -313,7 +313,7 @@ class FileTree2(object):
:type callback: function
"""
def walk(directory, parent_path):
- for path in directory["contents"]:
+ for path in directory["contents"].keys():
full_path = os.path.join(parent_path, path).replace("\\", "/")
if directory["contents"][path]["type"] == "dir":
directory["contents"][path] = callback(
@@ -393,7 +393,7 @@ class FileTree(object):
:type callback: function
"""
def walk(directory, parent_path):
- for path in directory:
+ for path in directory.keys():
full_path = os.path.join(parent_path, path)
if isinstance(directory[path], dict):
directory[path] = callback(full_path, directory[path]) or directory[path]