From f6887ff17758edbad2fbdc88c835efbfd5fd08b2 Mon Sep 17 00:00:00 2001 From: Antoine LE CALVEZ Date: Sat, 15 Nov 2014 00:13:24 +0100 Subject: [PATCH] explicit casting of Decimal rounding to float for python3.3+ --- bitcoinrpc/authproxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitcoinrpc/authproxy.py b/bitcoinrpc/authproxy.py index 7a104ff..75d637d 100644 --- a/bitcoinrpc/authproxy.py +++ b/bitcoinrpc/authproxy.py @@ -61,7 +61,7 @@ def __init__(self, rpc_error): def EncodeDecimal(o): if isinstance(o, decimal.Decimal): - return round(o, 8) + return float(round(o, 8)) raise TypeError(repr(o) + " is not JSON serializable") class AuthServiceProxy(object):