[#2233] [lp:#1487704] Fix AttributeError in set_trackers with lt 1.0

This commit is contained in:
Calum Lind 2015-08-22 15:31:26 +01:00
parent 123dd8f011
commit acf4fc4193
1 changed files with 6 additions and 3 deletions

View File

@ -328,9 +328,12 @@ class Torrent(object):
if trackers == None:
trackers = []
for value in self.handle.trackers():
tracker = {}
tracker["url"] = value.url
tracker["tier"] = value.tier
if lt.version_major == 0 and lt.version_minor < 15:
tracker = {}
tracker["url"] = value.url
tracker["tier"] = value.tier
else:
tracker = value
trackers.append(tracker)
self.trackers = trackers
self.tracker_host = None