fix args for ping()

This commit is contained in:
Jack Robison 2017-10-10 13:18:38 -04:00
parent fe2d6bad1b
commit a942e6f3eb
No known key found for this signature in database
GPG key ID: 284699E7404E3CFF

View file

@ -382,9 +382,13 @@ class KademliaProtocol(protocol.DatagramProtocol):
log.debug("DHT RECV CALL %s %s:%i", method, senderContact.address,
senderContact.port)
try:
kwargs = {'_rpcNodeID': senderContact.id, '_rpcNodeContact': senderContact}
result = func(*args, **kwargs)
if method != 'ping':
kwargs = {'_rpcNodeID': senderContact.id, '_rpcNodeContact': senderContact}
result = func(*args, **kwargs)
else:
result = func()
except Exception, e:
log.exception("error handling request for %s: %s", senderContact.address, method)
df.errback(e)
else:
df.callback(result)