From 746b4038906df372280f687e275e173ba0d20e2a Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Mon, 13 Jan 2025 16:37:18 +0100 Subject: [PATCH] Noise floor output formatting --- RNS/Utilities/rnstatus.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RNS/Utilities/rnstatus.py b/RNS/Utilities/rnstatus.py index 77b8999..78bc0b3 100644 --- a/RNS/Utilities/rnstatus.py +++ b/RNS/Utilities/rnstatus.py @@ -321,7 +321,10 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json= print(" Rate : {ss}".format(ss=speed_str(ifstat["bitrate"]))) if "noise_floor" in ifstat: - print(" Noise Fl. : {nfl} dBm".format(nfl=str(ifstat["noise_floor"]))) + if ifstat["noise_floor"] != None: + print(" Noise Fl. : {nfl} dBm".format(nfl=str(ifstat["noise_floor"]))) + else: + print(" Noise Fl. : Unknown") if "battery_percent" in ifstat and ifstat["battery_percent"] != None: try: