Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(
self,
jsonrpc = None,
id = None,
result = None,
error = None
):
"""
:param jsonrpc: JSON-RPC version string
:param id: JSON-RPC transaction id
:param result: Result data
"""
Bunch.__init__(self)
self.jsonrpc = jsonrpc
self.id = id
self.result = result if not error else None
self.error = error
def __init__(
self,
jsonrpc = None,
method = None,
id = None,
params = None
):
Bunch.__init__(self)
self.jsonrpc = jsonrpc or "2.0"
self.method = method
self.id = id
self.params = params
def __init__(self, *args, **kwargs):
warnings.warn(
'DictContainer is deprecated. Use the Munch class'
' from python-bunch instead.', DeprecationWarning, stacklevel=2)
Munch.__init__(self, *args, **kwargs)
def __init__(self, code, message, data):
"""
:param code: Error code
:param message: Error message
:param data: Additional error informations
"""
Bunch.__init__(self)
self.code = code
self.message = message
self.data = data