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
|
@ -96,7 +96,11 @@ class SessionProxy(component.Component):
|
||||||
"""
|
"""
|
||||||
sd = {}
|
sd = {}
|
||||||
for torrent_id in torrent_ids:
|
for torrent_id in torrent_ids:
|
||||||
|
if keys:
|
||||||
sd[torrent_id] = dict([(x, y) for x, y in self.torrents[torrent_id][1].iteritems() if x in 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…
Reference in New Issue