raise attribute error for non-rpc functions in Contact
This commit is contained in:
parent
ec1b6b2387
commit
0d23c68797
|
@ -139,6 +139,9 @@ class _Contact(object):
|
||||||
host Node's C{_protocol} object).
|
host Node's C{_protocol} object).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if name not in ['ping', 'findValue', 'findNode', 'store']:
|
||||||
|
raise AttributeError("unknown command: %s" % name)
|
||||||
|
|
||||||
def _sendRPC(*args, **kwargs):
|
def _sendRPC(*args, **kwargs):
|
||||||
return self._networkProtocol.sendRPC(self, name, args, **kwargs)
|
return self._networkProtocol.sendRPC(self, name, args, **kwargs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue