(self, *args, **argsn)
| 139 | return self._get_response() |
| 140 | |
| 141 | def __call__(self, *args, **argsn): |
| 142 | AuthServiceProxy.__id_count += 1 |
| 143 | |
| 144 | log.debug("-%s-> %s %s"%(AuthServiceProxy.__id_count, self._service_name, |
| 145 | json.dumps(args, default=EncodeDecimal, ensure_ascii=self.ensure_ascii))) |
| 146 | if args and argsn: |
| 147 | raise ValueError('Cannot handle both named and positional arguments') |
| 148 | postdata = json.dumps({'version': '1.1', |
| 149 | 'method': self._service_name, |
| 150 | 'params': args or argsn, |
| 151 | 'id': AuthServiceProxy.__id_count}, default=EncodeDecimal, ensure_ascii=self.ensure_ascii) |
| 152 | response = self._request('POST', self.__url.path, postdata.encode('utf-8')) |
| 153 | if response['error'] is not None: |
| 154 | raise JSONRPCException(response['error']) |
| 155 | elif 'result' not in response: |
| 156 | raise JSONRPCException({ |
| 157 | 'code': -343, 'message': 'missing JSON-RPC result'}) |
| 158 | else: |
| 159 | return response['result'] |
| 160 | |
| 161 | def _batch(self, rpc_call_list): |
| 162 | postdata = json.dumps(list(rpc_call_list), default=EncodeDecimal, ensure_ascii=self.ensure_ascii) |
nothing calls this directly
no test coverage detected