mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +00:00
Fix potential keyerror for on_torrent_removed in sessionproxy
This commit is contained in:
parent
403ad26111
commit
2b865273f6
1 changed files with 3 additions and 2 deletions
|
@ -250,5 +250,6 @@ class SessionProxy(component.Component):
|
|||
client.core.get_torrent_status(torrent_id, []).addCallback(on_status)
|
||||
|
||||
def on_torrent_removed(self, torrent_id):
|
||||
del self.torrents[torrent_id]
|
||||
del self.cache_times[torrent_id]
|
||||
if torrent_id in self.torrents:
|
||||
del self.torrents[torrent_id]
|
||||
del self.cache_times[torrent_id]
|
||||
|
|
Loading…
Add table
Reference in a new issue