Browse Source

Merge #8810: tests: Add exception error message for JSONRPCException

42f6aed tests: Add exception error message for JSONRPCException (Wladimir J. van der Laan)
tags/v0.15.1
Wladimir J. van der Laan 5 years ago
parent
commit
14e8f9916b
No account linked to committer's email address
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      qa/rpc-tests/test_framework/authproxy.py

+ 5
- 1
qa/rpc-tests/test_framework/authproxy.py View File

@@ -55,7 +55,11 @@ log = logging.getLogger("BitcoinRPC")

class JSONRPCException(Exception):
def __init__(self, rpc_error):
Exception.__init__(self)
try:
errmsg = '%(message)s (%(code)i)' % rpc_error
except (KeyError, TypeError):
errmsg = ''
Exception.__init__(self, errmsg)
self.error = rpc_error



Loading…
Cancel
Save