Module: deluge Branch: 1.3-stable Commit: 62d02091b32f48c0bd5de82bb3895e82134e3548
Author: Andrew Resch <[email protected]> Date: Fri Aug 6 17:26:23 2010 -0700 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 files changed, 5 insertions(+), 1 deletions(-) diff --git a/deluge/ui/sessionproxy.py b/deluge/ui/sessionproxy.py index 718c951..d29c4ff 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): -- You received this message because you are subscribed to the Google Groups "deluge-commit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/deluge-commit?hl=en.
