Remove 'torrent_alert' handler

This commit is contained in:
Andrew Resch 2008-12-27 00:02:11 +00:00
parent 45e3f12a49
commit 15802aa432
1 changed files with 0 additions and 13 deletions

View File

@ -146,7 +146,6 @@ class TorrentManager(component.Component):
self.on_alert_tracker_reply) self.on_alert_tracker_reply)
self.alerts.register_handler("tracker_announce_alert", self.alerts.register_handler("tracker_announce_alert",
self.on_alert_tracker_announce) self.on_alert_tracker_announce)
self.alerts.register_handler("tracker_alert", self.on_alert_tracker)
self.alerts.register_handler("tracker_warning_alert", self.alerts.register_handler("tracker_warning_alert",
self.on_alert_tracker_warning) self.on_alert_tracker_warning)
self.alerts.register_handler("tracker_error_alert", self.alerts.register_handler("tracker_error_alert",
@ -690,18 +689,6 @@ class TorrentManager(component.Component):
except KeyError: except KeyError:
log.debug("torrent_id doesn't exist.") log.debug("torrent_id doesn't exist.")
def on_alert_tracker(self, alert):
log.debug("on_alert_tracker")
# Get the torrent_id
torrent_id = str(alert.handle.info_hash())
tracker_status = "%s: %s" % \
(_("Alert"), str(alert.message()).strip('"')[8:])
# Set the tracker status for the torrent
try:
self.torrents[torrent_id].set_tracker_status(tracker_status)
except KeyError:
log.debug("torrent_id doesn't exist.")
def on_alert_tracker_warning(self, alert): def on_alert_tracker_warning(self, alert):
log.debug("on_alert_tracker_warning") log.debug("on_alert_tracker_warning")
# Get the torrent_id # Get the torrent_id