summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Resch <andrewresch@gmail.com>2010-08-06 17:26:23 -0700
committerAndrew Resch <andrewresch@gmail.com>2010-08-06 17:26:23 -0700
commit62d02091b32f48c0bd5de82bb3895e82134e3548 (patch)
treec096eca054cfdbec563b7eebef8e12ac3ff22058
parent161ad0ff0d01463f07127b9f01e0087f61f22a11 (diff)
downloaddeluge-62d02091b32f48c0bd5de82bb3895e82134e3548.tar.gz
deluge-62d02091b32f48c0bd5de82bb3895e82134e3548.tar.bz2
deluge-62d02091b32f48c0bd5de82bb3895e82134e3548.zip
Fix getting a torrent's status with an empty key list to return all the
torrent's status keys instead of an empty dict
-rw-r--r--deluge/ui/sessionproxy.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/deluge/ui/sessionproxy.py b/deluge/ui/sessionproxy.py
index 718c95104..d29c4ffa2 100644
--- a/deluge/ui/sessionproxy.py
+++ b/deluge/ui/sessionproxy.py
@@ -96,7 +96,11 @@ class SessionProxy(component.Component):
"""
sd = {}
for torrent_id in torrent_ids:
- sd[torrent_id] = dict([(x, y) for x, y in self.torrents[torrent_id][1].iteritems() if x in keys])
+ if keys:
+ sd[torrent_id] = dict([(x, y) for x, y in self.torrents[torrent_id][1].iteritems() if x in keys])
+ else:
+ sd[torrent_id] = dict(self.torrents[torrent_id][1])
+
return sd
def get_torrent_status(self, torrent_id, keys):