From 4d0560eff2370e59f21705c59269b11d30027776 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Fri, 6 Aug 2010 17:26:23 -0700 Subject: [PATCH] Fix getting a torrent's status with an empty key list to return all the torrent's status keys instead of an empty dict --- deluge/ui/sessionproxy.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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):