fix fixes fix

main
"Riku" 2024-12-09 15:40:57 +02:00
parent 85d0d3a307
commit 897fa34ae5
1 changed files with 4 additions and 4 deletions

View File

@ -116,7 +116,7 @@ class serveInfos(BaseHTTPRequestHandler):
self.wfile.write(bytes("# HELP zte_rsrq Reference Signal Received Quality\n# TYPE zte_rsrq gauge\n", "utf-8")) self.wfile.write(bytes("# HELP zte_rsrq Reference Signal Received Quality\n# TYPE zte_rsrq gauge\n", "utf-8"))
self.wfile.write(bytes("# HELP zte_rssi Received Signal Strength Indicator\n# TYPE zte_rssi gauge\n", "utf-8")) self.wfile.write(bytes("# HELP zte_rssi Received Signal Strength Indicator\n# TYPE zte_rssi gauge\n", "utf-8"))
if gatheredJson['nr5g_action_band']: if gatheredJson['nr5g_action_band'] != 0:
self.wfile.write(bytes("zte_rsrq{band=\"%s\"} " % gatheredJson["nr5g_action_band"], "utf-8")) self.wfile.write(bytes("zte_rsrq{band=\"%s\"} " % gatheredJson["nr5g_action_band"], "utf-8"))
self.wfile.write(bytes("%s\n" % gatheredJson["Z5g_rsrq"], "utf-8")) self.wfile.write(bytes("%s\n" % gatheredJson["Z5g_rsrq"], "utf-8"))
@ -129,7 +129,7 @@ class serveInfos(BaseHTTPRequestHandler):
self.wfile.write(bytes("zte_snr{band=\"%s\"} " % gatheredJson["nr5g_action_band"], "utf-8")) self.wfile.write(bytes("zte_snr{band=\"%s\"} " % gatheredJson["nr5g_action_band"], "utf-8"))
self.wfile.write(bytes("%s\n\n" % gatheredJson["Z5g_SINR"], "utf-8")) self.wfile.write(bytes("%s\n\n" % gatheredJson["Z5g_SINR"], "utf-8"))
if gatheredJson['nr_multi_ca_scell_info']: if not len(gatheredJson['nr_multi_ca_scell_info']) == 0:
for index, item in enumerate(gatheredJson['nr_multi_ca_scell_info'].split(";")): for index, item in enumerate(gatheredJson['nr_multi_ca_scell_info'].split(";")):
nrbit = item.split(",") nrbit = item.split(",")
if not len(nrbit[0]) == 0: if not len(nrbit[0]) == 0:
@ -145,7 +145,7 @@ class serveInfos(BaseHTTPRequestHandler):
self.wfile.write(bytes("zte_snr{band=\"%s\"} " % nrbit[3], "utf-8")) self.wfile.write(bytes("zte_snr{band=\"%s\"} " % nrbit[3], "utf-8"))
self.wfile.write(bytes("%s\n\n" % nrbit[9], "utf-8")) self.wfile.write(bytes("%s\n\n" % nrbit[9], "utf-8"))
if gatheredJson['lte_ca_pcell_band']: if gatheredJson['lte_ca_pcell_band'] and gatheredJson['lte_ca_pcell_band'] != "0":
self.wfile.write(bytes("zte_rsrq{band=\"b%s\"} " % gatheredJson["lte_ca_pcell_band"], "utf-8")) self.wfile.write(bytes("zte_rsrq{band=\"b%s\"} " % gatheredJson["lte_ca_pcell_band"], "utf-8"))
self.wfile.write(bytes("%s\n" % gatheredJson["lte_rsrq"], "utf-8")) self.wfile.write(bytes("%s\n" % gatheredJson["lte_rsrq"], "utf-8"))
@ -158,7 +158,7 @@ class serveInfos(BaseHTTPRequestHandler):
self.wfile.write(bytes("zte_snr{band=\"b%s\"} " % gatheredJson["lte_ca_pcell_band"], "utf-8")) self.wfile.write(bytes("zte_snr{band=\"b%s\"} " % gatheredJson["lte_ca_pcell_band"], "utf-8"))
self.wfile.write(bytes("%s\n\n" % gatheredJson["lte_snr"], "utf-8")) self.wfile.write(bytes("%s\n\n" % gatheredJson["lte_snr"], "utf-8"))
if gatheredJson['lte_multi_ca_scell_info']: if not len(gatheredJson['lte_multi_ca_scell_info']) == 0:
for index, item in enumerate(gatheredJson['lte_multi_ca_scell_info'].split(";")): for index, item in enumerate(gatheredJson['lte_multi_ca_scell_info'].split(";")):
cabit = item.split(",") cabit = item.split(",")
sigbits = gatheredJson['lte_multi_ca_scell_sig_info'].split(";") sigbits = gatheredJson['lte_multi_ca_scell_sig_info'].split(";")