aboutsummaryrefslogtreecommitdiffstats
path: root/example_stats_receiver.py
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2024-05-22 07:28:07 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2024-05-22 07:28:07 +0200
commit31faad73568712e9e77cfbd0bf50f3b7cc2ede00 (patch)
tree72329d00812aafab57c593d6d818845a8afc5fa8 /example_stats_receiver.py
parent94e42b28636c7b629574dddd082f1ac9caab403e (diff)
downloadODR-AudioEnc-31faad73568712e9e77cfbd0bf50f3b7cc2ede00.tar.gz
ODR-AudioEnc-31faad73568712e9e77cfbd0bf50f3b7cc2ede00.tar.bz2
ODR-AudioEnc-31faad73568712e9e77cfbd0bf50f3b7cc2ede00.zip
Make stats output JSON-compatible
JSON is a subset of YAML, so YAML parsers still work
Diffstat (limited to 'example_stats_receiver.py')
-rwxr-xr-xexample_stats_receiver.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/example_stats_receiver.py b/example_stats_receiver.py
index a48f560..9c9750c 100755
--- a/example_stats_receiver.py
+++ b/example_stats_receiver.py
@@ -7,7 +7,7 @@ import os
import os.path
import socket
import argparse
-import yaml
+import json
parser = argparse.ArgumentParser(
description="Example Stats UNIX Datagram Socket Receiver")
@@ -34,5 +34,5 @@ while True:
data, addr = sock.recvfrom(256)
logging.info("RX from {}". format(addr))
- data = yaml.safe_load(data)
+ data = json.loads(data)
print(data)