diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-05-22 07:28:07 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-05-22 07:28:07 +0200 |
commit | 31faad73568712e9e77cfbd0bf50f3b7cc2ede00 (patch) | |
tree | 72329d00812aafab57c593d6d818845a8afc5fa8 /example_stats_receiver.py | |
parent | 94e42b28636c7b629574dddd082f1ac9caab403e (diff) | |
download | ODR-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-x | example_stats_receiver.py | 4 |
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) |