Sitelet https://github.com/jgarzik/python-bitcoinrpc/commit/d588bf21728f638c5b2b5e5de3eb6792ef37fa5f
Skip to content

Commit d588bf2

Browse files
committed
JSONRPCException: When possible, pass JSON-RPC message to Exception parent class
1 parent 337f0d6 commit d588bf2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎bitcoinrpc/authproxy.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@
5353

5454
class JSONRPCException(Exception):
5555
def __init__(self, rpc_error):
56-
Exception.__init__(self)
56+
parent_args = []
57+
try:
58+
parent_args.append(rpc_error['message'])
59+
except:
60+
pass
61+
Exception.__init__(self, *parent_args)
5762
self.error = rpc_error
5863

5964

0 commit comments

Comments
 (0)