added error handling

This commit is contained in:
Michael Clemens 2024-03-07 13:43:20 +01:00
parent f8a3ba50e8
commit b607b7a74d
1 changed files with 1 additions and 2 deletions

View File

@ -91,9 +91,8 @@ class BottomWidgets(StandardWidgets): # Add extra widgets to the bottom of the s
self.SetBand()
try:
result = hardrock_server.getStatus()
print(result)
except:
result = {'pep': 'ERR', 'avg': 'ERR', 'swr': 'ERR', 'temp': 'ERR', 'band': 'ERR'}
result = {}
if "pep" in result:
self.pa_text_fwd_power.SetLabel(str(result["pep"]) + "(" + str(result["avg"]) + ")" + "W")
else: