mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
Fix getting a torrent's status with an empty key list to return all the
torrent's status keys instead of an empty dict
This commit is contained in:
parent
d49cde1994
commit
4d0560eff2
1 changed files with 5 additions and 1 deletions
|
@ -96,7 +96,11 @@ class SessionProxy(component.Component):
|
||||||
"""
|
"""
|
||||||
sd = {}
|
sd = {}
|
||||||
for torrent_id in torrent_ids:
|
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
|
return sd
|
||||||
|
|
||||||
def get_torrent_status(self, torrent_id, keys):
|
def get_torrent_status(self, torrent_id, keys):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue