pylightning: make plugins use Millisatoshi-converting encoder.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2019-02-25 14:45:56 +10:30
parent 5a7d038e6e
commit 6ace13ba22

View File

@ -371,7 +371,7 @@ class Plugin(object):
self.log(traceback.format_exc())
def _write_locked(self, obj):
s = json.dumps(obj) + "\n\n"
s = json.dumps(obj, cls=LightningRpc.LightningJSONEncoder) + "\n\n"
with self.write_lock:
self.stdout.write(s)
self.stdout.flush()