diff --git a/bindings/python/src/alert.cpp b/bindings/python/src/alert.cpp index 20f7e6998..91f9e847a 100644 --- a/bindings/python/src/alert.cpp +++ b/bindings/python/src/alert.cpp @@ -674,12 +674,12 @@ void bind_alert() class_, noncopyable>( "file_completed_alert", no_init) - .def_readonly("index", &file_completed_alert::index) + .add_property("index", make_getter(&file_completed_alert::index, by_value())) ; class_, noncopyable>( "file_renamed_alert", no_init) - .def_readonly("index", &file_renamed_alert::index) + .add_property("index", make_getter(&file_renamed_alert::index, by_value())) #ifndef TORRENT_NO_DEPRECATE .def_readonly("name", &file_renamed_alert::name) #endif @@ -688,7 +688,7 @@ void bind_alert() class_, noncopyable>( "file_rename_failed_alert", no_init) - .def_readonly("index", &file_rename_failed_alert::index) + .add_property("index", make_getter(&file_rename_failed_alert::index, by_value())) .def_readonly("error", &file_rename_failed_alert::error) ;