| 48 | log = logging.getLogger("BitcoinRPC") |
| 49 | |
| 50 | class JSONRPCException(Exception): |
| 51 | def __init__(self, rpc_error): |
| 52 | try: |
| 53 | errmsg = '%(message)s (%(code)i)' % rpc_error |
| 54 | except (KeyError, TypeError): |
| 55 | errmsg = '' |
| 56 | super().__init__(errmsg) |
| 57 | self.error = rpc_error |
| 58 | |
| 59 | |
| 60 | def EncodeDecimal(o): |
no outgoing calls