From 4b5dc6bc28b38bb9bac3e3ccf6016ae60b0af6ae Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 29 Sep 2008 23:11:17 +0000 Subject: [PATCH] Fix display of tracker error messages --- ChangeLog | 3 ++- deluge/core/torrentmanager.py | 3 +-- libtorrent/bindings/python/src/alert.cpp | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a6d4047f5..32aa7346d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,7 +2,8 @@ Deluge 1.0.1 (In Development) Core: * Change the default max global upload slots to 4 instead of -1 since libtorrent will automatically open more slots to meet the upload speed limit. - + * Fix display of tracker error messages + Misc: * Fix #187 set a 5 second timer to save the config file after a config value has been changed. diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index 0affa34f3..f14f6885d 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -715,8 +715,7 @@ class TorrentManager(component.Component): def on_alert_tracker_error(self, alert): log.debug("on_alert_tracker_error") torrent = self.torrents[str(alert.handle.info_hash())] - error_msg = " ".join(alert.message().split()[3:]).split(":")[0] - tracker_status = "%s: %s" % (_("Error"), error_msg) + tracker_status = "%s: %s" % (_("Error"), alert.msg) try: torrent.set_tracker_status(tracker_status) except KeyError: diff --git a/libtorrent/bindings/python/src/alert.cpp b/libtorrent/bindings/python/src/alert.cpp index fe34c6c27..d87071bd3 100755 --- a/libtorrent/bindings/python/src/alert.cpp +++ b/libtorrent/bindings/python/src/alert.cpp @@ -104,6 +104,7 @@ void bind_alert() class_, noncopyable>( "tracker_error_alert", tracker_error_alert_doc, no_init ) + .def_readonly("msg", &tracker_error_alert::msg) .def_readonly("times_in_row", &tracker_error_alert::times_in_row) .def_readonly("status_code", &tracker_error_alert::status_code) ;