From 809a41f1238a9d00252e069207ddf43555e0fbe3 Mon Sep 17 00:00:00 2001 From: Hemna Date: Fri, 17 Nov 2023 14:23:29 -0500 Subject: [PATCH] Fix for types --- aprsd/wsgi.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/aprsd/wsgi.py b/aprsd/wsgi.py index 00bf6d8..57a6cb1 100644 --- a/aprsd/wsgi.py +++ b/aprsd/wsgi.py @@ -95,15 +95,14 @@ def _stats(): stats_dict["aprsd"]["watch_list"] = new_list packet_list = aprsd_rpc_client.RPCClient().get_packet_list() rx = tx = 0 + types = {} if packet_list: rx = packet_list.total_rx() tx = packet_list.total_tx() - types = {} + types_copy = packet_list.types.copy() - types_copy = packet_list.types.copy() - - for key in types_copy: - types[str(key)] = dict(types_copy[key]) + for key in types_copy: + types[str(key)] = dict(types_copy[key]) stats_dict["packets"] = { "sent": tx,