diff --git a/bindings/python/src/torrent_handle.cpp b/bindings/python/src/torrent_handle.cpp index 80d4fa0ae..69bef1041 100644 --- a/bindings/python/src/torrent_handle.cpp +++ b/bindings/python/src/torrent_handle.cpp @@ -161,21 +161,7 @@ void replace_trackers(torrent_handle& h, object trackers) if (entry == handle<>()) break; - dict d; - d = extract(object(entry)); - - std::string url; - url = extract(d["url"]); - - announce_entry a(url); - - if (d.has_key("tier")) - a.tier = extract(d["tier"]); - - if (d.has_key("fail_limit")) - a.fail_limit = extract(d["fail_limit"]); - - result.push_back(a); + result.push_back(extract(object(entry))); } allow_threading_guard guard;