diff options
author | Andrew Resch <andrewresch@gmail.com> | 2009-04-25 20:49:22 +0000 |
---|---|---|
committer | Andrew Resch <andrewresch@gmail.com> | 2009-04-25 20:49:22 +0000 |
commit | 9bf27f1249b8b5bdb740249e74517ca62763a718 (patch) | |
tree | c646aeb3b491df1371670978b694d655f8454680 | |
parent | 127b58c36d9228200d880dc2f80abe1cb7cc456a (diff) | |
download | deluge-9bf27f1249b8b5bdb740249e74517ca62763a718.tar.gz deluge-9bf27f1249b8b5bdb740249e74517ca62763a718.tar.bz2 deluge-9bf27f1249b8b5bdb740249e74517ca62763a718.zip |
Catch get_peer_info exception to prevent deluge from crashing..
-rw-r--r-- | deluge/core/torrent.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 92f1c8ff1..5faa2fc52 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -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 |