Catch exception when removing a checking torrent

This commit is contained in:
Andrew Resch 2009-02-28 21:05:49 +00:00
commit 4baf7b167a

View file

@ -743,9 +743,14 @@ class TorrentManager(component.Component):
def on_alert_state_changed(self, alert): def on_alert_state_changed(self, alert):
log.debug("on_alert_state_changed") log.debug("on_alert_state_changed")
torrent_id = str(alert.handle.info_hash()) try:
self.torrents[torrent_id].update_state() torrent_id = str(alert.handle.info_hash())
component.get("SignalManager").emit("torrent_state_changed", torrent_id) except RuntimeError:
return
if torrent_id in self.torrents:
self.torrents[torrent_id].update_state()
component.get("SignalManager").emit("torrent_state_changed", torrent_id)
def on_alert_save_resume_data(self, alert): def on_alert_save_resume_data(self, alert):
log.debug("on_alert_save_resume_data") log.debug("on_alert_save_resume_data")