diff --git a/bitcoinrpc/authproxy.py b/bitcoinrpc/authproxy.py index abebe4b..e53e211 100644 --- a/bitcoinrpc/authproxy.py +++ b/bitcoinrpc/authproxy.py @@ -166,11 +166,10 @@ def batch_(self, rpc_calls): 'Content-type': 'application/json'}) results = [] responses = self._get_response() - if isinstance(responses, (dict,)): - if ('error' in responses) and (responses['error'] is not None): - raise JSONRPCException(responses['error']) - raise JSONRPCException({ - 'code': -32700, 'message': 'Parse error'}) + + if type(responses) != list: + responses = [responses] + for response in responses: if response['error'] is not None: raise JSONRPCException(response['error'])