mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +00:00
Catch get_peer_info exception to prevent deluge from crashing..
This commit is contained in:
parent
127b58c36d
commit
9bf27f1249
1 changed files with 5 additions and 1 deletions
|
@ -473,7 +473,11 @@ class Torrent:
|
|||
def get_peers(self):
|
||||
"""Returns a list of peers and various information about them"""
|
||||
ret = []
|
||||
peers = self.handle.get_peer_info()
|
||||
try:
|
||||
peers = self.handle.get_peer_info()
|
||||
except IndexError, e:
|
||||
log.error("There was an error getting peer info! This may be a bug in libtorrent. Please upgrade to libtorrent >= 0.14.3.")
|
||||
return ret
|
||||
|
||||
for peer in peers:
|
||||
# We do not want to report peers that are half-connected
|
||||
|
|
Loading…
Add table
Reference in a new issue