From 62b713041ac24980860da8dab19a45cf1a40656f Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Thu, 24 Apr 2008 09:46:15 +0000 Subject: [PATCH] Add torrent_error_alert to python bindings --- libtorrent/bindings/python/src/alert.cpp | 11 +++++++++-- libtorrent/bindings/python/src/docstrings.cpp | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/libtorrent/bindings/python/src/alert.cpp b/libtorrent/bindings/python/src/alert.cpp index 9a72b9942..e48b787d6 100755 --- a/libtorrent/bindings/python/src/alert.cpp +++ b/libtorrent/bindings/python/src/alert.cpp @@ -14,6 +14,7 @@ extern char const* alert_msg_doc; extern char const* alert_severity_doc; extern char const* torrent_alert_doc; extern char const* tracker_alert_doc; +extern char const* tracker_error_alert_doc; extern char const* tracker_warning_alert_doc; extern char const* tracker_reply_alert_doc; extern char const* tracker_announce_alert_doc; @@ -79,8 +80,14 @@ void bind_alert() class_, noncopyable>( "tracker_alert", tracker_alert_doc, no_init ) - .def_readonly("times_in_row", &tracker_alert::times_in_row) - .def_readonly("status_code", &tracker_alert::status_code) + .def_readonly("url", &tracker_alert::url) + ; + + class_, noncopyable>( + "tracker_error_alert", tracker_error_alert_doc, no_init + ) + .def_readonly("times_in_row", &tracker_error_alert::times_in_row) + .def_readonly("status_code", &tracker_error_alert::status_code) ; class_, noncopyable>( diff --git a/libtorrent/bindings/python/src/docstrings.cpp b/libtorrent/bindings/python/src/docstrings.cpp index 9ad19203f..0721127a4 100755 --- a/libtorrent/bindings/python/src/docstrings.cpp +++ b/libtorrent/bindings/python/src/docstrings.cpp @@ -202,6 +202,9 @@ char const* tracker_alert_doc = "\"200 OK\". From the alert you can get the handle to the torrent\n" "the tracker belongs to. This alert is generated as severity level\n" "`alert.severity_levels.warning`."; + +char const* tracker_error_alert_doc = + ""; char const* tracker_warning_alert_doc = "This alert is triggered if the tracker reply contains a warning\n"