Skip to content

Commit 65377c7

Browse files
committed
add comment to __getattr__ in RawProxy to clarify the intent of check
1 parent 7e191f0 commit 65377c7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bitcoin/rpc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,10 @@ def __init__(self,
289289

290290
def __getattr__(self, name):
291291
if name.startswith('__') and name.endswith('__'):
292-
# Python internal stuff
292+
# Prevent RPC calls for non-existing python internal attribute
293+
# access. If someone tries to get an internal attribute
294+
# of RawProxy instance, and the instance does not have this
295+
# attribute, we do not want the bogus RPC call to happen.
293296
raise AttributeError
294297

295298
# Create a callable to do the actual call

0 commit comments

Comments
 (0)