Fix potential keyerror for on_torrent_removed in sessionproxy
This commit is contained in:
parent
31ff64b537
commit
a494471ed4
|
@ -266,5 +266,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…
Reference in New Issue