mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-27 11:45:44 +00:00
Fixed bug in torrentmanager.separate_keys
If none of the torrent_id's were present in self.torrents, None would be returned.
This commit is contained in:
parent
fbeea9159e
commit
fbdda1b3a5
@ -1127,14 +1127,14 @@ class TorrentManager(component.Component):
|
|||||||
"""Separates the input keys into keys for the Torrent class
|
"""Separates the input keys into keys for the Torrent class
|
||||||
and keys for plugins.
|
and keys for plugins.
|
||||||
"""
|
"""
|
||||||
if not self.torrents:
|
if self.torrents:
|
||||||
return [], []
|
for torrent_id in torrent_ids:
|
||||||
for torrent_id in torrent_ids:
|
if torrent_id in self.torrents:
|
||||||
if torrent_id in self.torrents:
|
status_keys = self.torrents[torrent_id].status_funcs.keys()
|
||||||
status_keys = self.torrents[torrent_id].status_funcs.keys()
|
leftover_keys = list(set(keys) - set(status_keys))
|
||||||
leftover_keys = list(set(keys) - set(status_keys))
|
torrent_keys = list(set(keys) - set(leftover_keys))
|
||||||
torrent_keys = list(set(keys) - set(leftover_keys))
|
return torrent_keys, leftover_keys
|
||||||
return torrent_keys, leftover_keys
|
return [], []
|
||||||
|
|
||||||
def on_alert_state_update(self, alert):
|
def on_alert_state_update(self, alert):
|
||||||
log.debug("on_status_notification: %s", alert.message())
|
log.debug("on_status_notification: %s", alert.message())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user