summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-01-07 11:21:35 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-01-07 11:21:35 +0100
commit9e1a5e0d5a6421628863c049619e12800670e79a (patch)
treea18199340119dfda64cec8e96a41dafb1957d079
parent69eda096577d7185307081c28e95d81bb6b07f23 (diff)
downloaddabmux-9e1a5e0d5a6421628863c049619e12800670e79a.tar.gz
dabmux-9e1a5e0d5a6421628863c049619e12800670e79a.tar.bz2
dabmux-9e1a5e0d5a6421628863c049619e12800670e79a.zip
Make show_dabmux_stats py3 compatible
-rwxr-xr-xdoc/show_dabmux_stats.py8
1 files changed, 4 insertions, 4 deletions
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())