Author: andar
Revision: 5167
Log:
Catch get_peer_info exception to prevent deluge from crashing..
Diff:
Modified: branches/1.1.0_RC/deluge/core/torrent.py
===================================================================
--- branches/1.1.0_RC/deluge/core/torrent.py 2009-04-25 07:29:08 UTC (rev
5166)
+++ branches/1.1.0_RC/deluge/core/torrent.py 2009-04-25 20:49:22 UTC (rev
5167)
@@ -473,7 +473,11 @@
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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---