From 9e1a5e0d5a6421628863c049619e12800670e79a Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 7 Jan 2020 11:21:35 +0100 Subject: Make show_dabmux_stats py3 compatible --- doc/show_dabmux_stats.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/show_dabmux_stats.py b/doc/show_dabmux_stats.py index a451ef2..75998a5 100755 --- a/doc/show_dabmux_stats.py +++ b/doc/show_dabmux_stats.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python # # present statistics from dabmux Stats Server # to standard output. @@ -21,7 +21,7 @@ def connect(): sock = zmq.Socket(ctx, zmq.REQ) sock.connect("tcp://localhost:12720") - sock.send("info") + sock.send(b"info") infojson = json.loads(sock.recv()) sys.stderr.write("Statistics from ODR-DabMux {}\n".format(infojson['version'])) @@ -34,7 +34,7 @@ def connect(): if len(sys.argv) == 1: sock = connect() - sock.send("values") + sock.send(b"values") poller = zmq.Poller() poller.register(sock, zmq.POLLIN) @@ -91,7 +91,7 @@ if len(sys.argv) == 1: elif len(sys.argv) == 2 and sys.argv[1] == "config": sock = connect() - sock.send("config") + sock.send(b"config") config = json.loads(sock.recv()) -- cgit v1.2.3