Skip to content

Commit c6617fc

Browse files
committed
Merge #205: add comment to __getattr__ in RawProxy to clarify the intent of check
65377c7 add comment to __getattr__ in RawProxy to clarify the intent of check (Dmitry Petukhov) Pull request description: add clarifying comment, see #203 Tree-SHA512: 48ec48ed4e893c7f70499806c14f116054c32d31e75434d643c9ba37528df6493559835696176867fddd6bbdcccd74dba69d0b385916d8367948984b96a948cd
2 parents 607aa99 + 65377c7 commit c6617fc

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
@@ -296,7 +296,10 @@ def __init__(self,
296296

297297
def __getattr__(self, name):
298298
if name.startswith('__') and name.endswith('__'):
299-
# Python internal stuff
299+
# Prevent RPC calls for non-existing python internal attribute
300+
# access. If someone tries to get an internal attribute
301+
# of RawProxy instance, and the instance does not have this
302+
# attribute, we do not want the bogus RPC call to happen.
300303
raise AttributeError
301304

302305
# Create a callable to do the actual call

0 commit comments

Comments
 (0)