From d9ce4ff6342ce8a868313a68ca2a14f65acea13c Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Thu, 30 Jan 2014 13:19:21 +0000 Subject: [PATCH] add comment to tracker_error_alert handler --- deluge/core/torrentmanager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index 366b73d65..55f1eb2cd 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -1013,6 +1013,8 @@ class TorrentManager(component.Component): """Alert handler for libtorrent tracker_error_alert""" error_message = decode_string(alert.msg) if not error_message: + # alert.msg empty for '-1' code so fallback to a.e.message(), alert.msg cannot be replaced + # by a.e.message() because with non '-1' codes, the code is in the message. error_message = decode_string(alert.error.message()) log.debug("Tracker Error Alert: %s [%s]", decode_string(alert.message()), error_message) try: