Skip to content

Commit 501cdb4

Browse files
author
worepix
committed
Use simplejson for message dumps
1 parent f69508c commit 501cdb4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cpgw/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import click
88
import click_log
9+
import simplejson as json
910
import zmq
1011

1112
from cpgw.config import load_config
@@ -52,7 +53,7 @@ def on_recv(payload):
5253
payload['gw'] = gateway_serial
5354

5455
payload = json.dumps(payload, use_decimal=True)
55-
socket.send(payload)
56+
socket.send_string(payload)
5657

5758
gw.on_recv = on_recv
5859

0 commit comments

Comments
 (0)