[Debtorrent-commits] r29 - /debtorrent/trunk/DebTorrent/BT1/track.py

camrdale-guest at users.alioth.debian.org camrdale-guest at users.alioth.debian.org
Sun Apr 29 22:18:11 UTC 2007


Author: camrdale-guest
Date: Sun Apr 29 22:18:09 2007
New Revision: 29

URL: http://svn.debian.org/wsvn/debtorrent/?sc=1&rev=29
Log:
Fix a small tracker error caused by compact_reqd not being set

Modified:
    debtorrent/trunk/DebTorrent/BT1/track.py

Modified: debtorrent/trunk/DebTorrent/BT1/track.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/DebTorrent/BT1/track.py?rev=29&op=diff
==============================================================================
--- debtorrent/trunk/DebTorrent/BT1/track.py (original)
+++ debtorrent/trunk/DebTorrent/BT1/track.py Sun Apr 29 22:18:09 2007
@@ -689,15 +689,17 @@
                 self.seedcount[infohash] += 1
                 if not peer.get('nat', -1):
                     for bc in self.becache[infohash]:
-                        bc[1][myid] = bc[0][myid]
-                        del bc[0][myid]
+                        if bc[0].has_key(myid):
+                            bc[1][myid] = bc[0][myid]
+                            del bc[0][myid]
             elif left and not peer['left']:
                 self.completed[infohash] -= 1
                 self.seedcount[infohash] -= 1
                 if not peer.get('nat', -1):
                     for bc in self.becache[infohash]:
-                        bc[0][myid] = bc[1][myid]
-                        del bc[1][myid]
+                        if bc[0].has_key(myid):
+                            bc[0][myid] = bc[1][myid]
+                            del bc[1][myid]
             peer['left'] = left
 
             if port:




More information about the Debtorrent-commits mailing list