added error handling
This commit is contained in:
parent
f8a3ba50e8
commit
b607b7a74d
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue