mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-04 09:41:52 +01:00
test: Allow pathlib.Path as RPC argument via authproxy
Also, add datadir_path property to TestNode
This commit is contained in:
@@ -39,6 +39,7 @@ from http import HTTPStatus
|
||||
import http.client
|
||||
import json
|
||||
import logging
|
||||
import pathlib
|
||||
import socket
|
||||
import time
|
||||
import urllib.parse
|
||||
@@ -62,6 +63,8 @@ class JSONRPCException(Exception):
|
||||
def EncodeDecimal(o):
|
||||
if isinstance(o, decimal.Decimal):
|
||||
return str(o)
|
||||
if isinstance(o, pathlib.Path):
|
||||
return str(o)
|
||||
raise TypeError(repr(o) + " is not JSON serializable")
|
||||
|
||||
class AuthServiceProxy():
|
||||
|
||||
Reference in New Issue
Block a user