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
161ad0ff0d
commit
62d02091b3
@ -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…
x
Reference in New Issue
Block a user