From 0d23c687970fa0f06f52cd1545330abf55e19ba7 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 29 May 2018 10:59:07 -0400 Subject: [PATCH] raise attribute error for non-rpc functions in Contact --- lbrynet/dht/contact.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lbrynet/dht/contact.py b/lbrynet/dht/contact.py index b8dac520f..d7bbb443b 100644 --- a/lbrynet/dht/contact.py +++ b/lbrynet/dht/contact.py @@ -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)