Don't log KRPC errors for receiving an invalid store_value token.
authorCameron Dale <camrdale@gmail.com>
Tue, 29 Apr 2008 17:16:50 +0000 (10:16 -0700)
committerCameron Dale <camrdale@gmail.com>
Tue, 29 Apr 2008 17:16:50 +0000 (10:16 -0700)
apt_p2p_Khashmir/krpc.py

index d4c0583..a2afac7 100644 (file)
@@ -366,7 +366,8 @@ class KRPC:
                     ret = f(*(), **msg[ARG])
                 except KrpcError, e:
                     log.msg('Got a Krpc error while running: krpc_%s' % msg[REQ])
-                    log.err(e)
+                    if e[0] != KRPC_ERROR_INVALID_TOKEN:
+                        log.err(e)
                     self.stats.errorAction(msg[REQ])
                     olen = self._sendResponse(msg[REQ], addr, msg[TID], ERR,
                                               [e[0], e[1]])