attempt catching bandwidth integer conversion error

This commit is contained in:
DJ2LS 2024-04-30 10:18:33 +02:00
parent 62ec8f38ba
commit edd50128b8

View file

@ -270,6 +270,7 @@ class radio:
if response is not None: if response is not None:
response = response.strip() response = response.strip()
mode, bandwidth = response.split('\n', 1) mode, bandwidth = response.split('\n', 1)
bandwidth = int(bandwidth)
else: else:
mode = 'err' mode = 'err'
bandwidth = 'err' bandwidth = 'err'
@ -282,7 +283,7 @@ class radio:
bandwidth = 'err' bandwidth = 'err'
finally: finally:
self.parameters['mode'] = mode self.parameters['mode'] = mode
self.parameters['bandwidth'] = int(bandwidth) self.parameters['bandwidth'] = bandwidth
def get_alc(self): def get_alc(self):
try: try: