forked from LBRYCommunity/lbry-sdk
raise attribute error for non-rpc functions in Contact
This commit is contained in:
parent
ec1b6b2387
commit
0d23c68797
1 changed files with 3 additions and 0 deletions
|
@ -139,6 +139,9 @@ class _Contact(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):
|
||||
return self._networkProtocol.sendRPC(self, name, args, **kwargs)
|
||||
|
||||
|
|
Loading…
Reference in a new issue