]> git.mxchange.org Git - quix0rs-apt-p2p.git/commitdiff
handle late err messages
authorburris <burris>
Sun, 23 Feb 2003 00:11:04 +0000 (00:11 +0000)
committerburris <burris>
Sun, 23 Feb 2003 00:11:04 +0000 (00:11 +0000)
krpc.py

diff --git a/krpc.py b/krpc.py
index 63d9887747594d52005a7746266dd599dfbafb95..5f277692e1abf2e73af66c6e3b1665490e030b37 100644 (file)
--- a/krpc.py
+++ b/krpc.py
@@ -91,10 +91,14 @@ class KRPC(basic.NetstringReceiver):
             elif msg['typ'] == 'err':
                 # if error
                 #      lookup tid
-                df = self.tids[msg['tid']]
-                #      callback
-                df.errback(msg['err'])
-                del(self.tids[msg['tid']])
+                if self.tids.has_key(msg['tid']):
+                    df = self.tids[msg['tid']]
+                    #  callback
+                    df.errback(msg['err'])
+                    del(self.tids[msg['tid']])
+                else:
+                    # day late and dollar short
+                    pass
             else:
                 print "unknown message type " + `msg`
                 # unknown message type