]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - apt_p2p_Khashmir/knode.py
Remove the duplicate error logging from the knode module.
[quix0rs-apt-p2p.git] / apt_p2p_Khashmir / knode.py
index 36d77bdc99ea9a872f09609cad81db2f6af73cf8..1fbdbc3302521f62efa406dc2daabd52fb7e8a3f 100644 (file)
@@ -25,29 +25,21 @@ class KNodeBase(Node):
                 
         return dict
 
-    def errBack(self, err):
-        """Log an error that has occurred."""
-        log.err(err)
-        return err
-        
     def ping(self, id):
         """Ping the node."""
         df = self.conn.sendRequest('ping', {"id":id})
-        df.addErrback(self.errBack)
         df.addCallback(self.checkSender)
         return df
     
     def join(self, id):
         """Use the node to bootstrap into the system."""
         df = self.conn.sendRequest('join', {"id":id})
-        df.addErrback(self.errBack)
         df.addCallback(self.checkSender)
         return df
     
     def find_node(self, id, target):
         """Request the nearest nodes to the target that the node knows about."""
         df = self.conn.sendRequest('find_node', {"target" : target, "id": id})
-        df.addErrback(self.errBack)
         df.addCallback(self.checkSender)
         return df
 
@@ -57,14 +49,12 @@ class KNodeRead(KNodeBase):
     def find_value(self, id, key):
         """Request the nearest nodes to the key that the node knows about."""
         df =  self.conn.sendRequest('find_value', {"key" : key, "id" : id})
-        df.addErrback(self.errBack)
         df.addCallback(self.checkSender)
         return df
 
     def get_value(self, id, key, num):
         """Request the values that the node has for the key."""
         df = self.conn.sendRequest('get_value', {"key" : key, "num": num, "id" : id})
-        df.addErrback(self.errBack)
         df.addCallback(self.checkSender)
         return df
 
@@ -74,6 +64,5 @@ class KNodeWrite(KNodeRead):
     def store_value(self, id, key, value, token):
         """Store a value in the node."""
         df = self.conn.sendRequest('store_value', {"key" : key, "value" : value, "token" : token, "id": id})
-        df.addErrback(self.errBack)
         df.addCallback(self.checkSender)
         return df