mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 15:08:40 +00:00
Fix alert handling to use message instead of msg
This commit is contained in:
parent
8f55b4f5ae
commit
a51638ed62
1 changed files with 3 additions and 3 deletions
|
@ -638,7 +638,7 @@ class TorrentManager(component.Component):
|
||||||
torrent_id = str(alert.handle.info_hash())
|
torrent_id = str(alert.handle.info_hash())
|
||||||
# Set the tracker status for the torrent
|
# Set the tracker status for the torrent
|
||||||
try:
|
try:
|
||||||
if alert.msg != "Got peers from DHT":
|
if alert.message != "Got peers from DHT":
|
||||||
self.torrents[torrent_id].set_tracker_status(_("Announce OK"))
|
self.torrents[torrent_id].set_tracker_status(_("Announce OK"))
|
||||||
except KeyError:
|
except KeyError:
|
||||||
log.debug("torrent_id doesn't exist.")
|
log.debug("torrent_id doesn't exist.")
|
||||||
|
@ -669,7 +669,7 @@ class TorrentManager(component.Component):
|
||||||
# Get the torrent_id
|
# Get the torrent_id
|
||||||
torrent_id = str(alert.handle.info_hash())
|
torrent_id = str(alert.handle.info_hash())
|
||||||
tracker_status = "%s: %s" % \
|
tracker_status = "%s: %s" % \
|
||||||
(_("Alert"), str(alert.msg()).strip('"')[8:])
|
(_("Alert"), str(alert.message()).strip('"')[8:])
|
||||||
# Set the tracker status for the torrent
|
# Set the tracker status for the torrent
|
||||||
try:
|
try:
|
||||||
self.torrents[torrent_id].set_tracker_status(tracker_status)
|
self.torrents[torrent_id].set_tracker_status(tracker_status)
|
||||||
|
@ -680,7 +680,7 @@ class TorrentManager(component.Component):
|
||||||
log.debug("on_alert_tracker_warning")
|
log.debug("on_alert_tracker_warning")
|
||||||
# Get the torrent_id
|
# Get the torrent_id
|
||||||
torrent_id = str(alert.handle.info_hash())
|
torrent_id = str(alert.handle.info_hash())
|
||||||
tracker_status = '%s: %s' % (_("Warning"), str(alert.msg()))
|
tracker_status = '%s: %s' % (_("Warning"), str(alert.message()))
|
||||||
# Set the tracker status for the torrent
|
# Set the tracker status for the torrent
|
||||||
try:
|
try:
|
||||||
self.torrents[torrent_id].set_tracker_status(tracker_status)
|
self.torrents[torrent_id].set_tracker_status(tracker_status)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue