try to catch invalid handle in deluge_core
This commit is contained in:
parent
3ea3b6b5b0
commit
8dfb4b73eb
@ -1787,6 +1787,7 @@ static PyObject *torrent_replace_trackers(PyObject *self, PyObject *args)
|
|||||||
if (PyErr_Occurred())
|
if (PyErr_Occurred())
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
try {
|
||||||
if (M_torrents->at(index).handle.is_valid()){
|
if (M_torrents->at(index).handle.is_valid()){
|
||||||
std::vector<libtorrent::announce_entry> trackerlist;
|
std::vector<libtorrent::announce_entry> trackerlist;
|
||||||
std::istringstream trackers(tracker);
|
std::istringstream trackers(tracker);
|
||||||
@ -1804,6 +1805,8 @@ static PyObject *torrent_replace_trackers(PyObject *self, PyObject *args)
|
|||||||
M_torrents->at(index).handle.force_reannounce();
|
M_torrents->at(index).handle.force_reannounce();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (libtorrent::invalid_handle&) {}
|
||||||
Py_INCREF(Py_None); return Py_None;
|
Py_INCREF(Py_None); return Py_None;
|
||||||
}
|
}
|
||||||
static PyObject *torrent_prioritize_files(PyObject *self, PyObject *args)
|
static PyObject *torrent_prioritize_files(PyObject *self, PyObject *args)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user