2 parents 65206ca + 5409b02 commit d5f45daCopy full SHA for d5f45da
1 file changed
bitcoinrpc/authproxy.py
@@ -137,8 +137,9 @@ def __call__(self, *args):
137
self.__conn.sock.settimeout(self.__timeout)
138
139
response = self._get_response()
140
- if response['error'] is not None:
141
- raise JSONRPCException(response['error'])
+ if 'error' in response:
+ if response['error'] is not None:
142
+ raise JSONRPCException(response['error'])
143
elif 'result' not in response:
144
raise JSONRPCException({
145
'code': -343, 'message': 'missing JSON-RPC result'})
0 commit comments