mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
dont throw error for freq if None
This commit is contained in:
parent
4f7352f3ed
commit
51fdab8625
1 changed files with 2 additions and 2 deletions
|
@ -258,8 +258,8 @@ class radio:
|
||||||
|
|
||||||
def get_frequency(self):
|
def get_frequency(self):
|
||||||
try:
|
try:
|
||||||
frequency_response = int(self.send_command('f'))
|
frequency_response = self.send_command('f')
|
||||||
self.parameters['frequency'] = frequency_response if frequency_response is not None else 'err'
|
self.parameters['frequency'] = int(frequency_response) if frequency_response is not None else 'err'
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.log.warning(f"Error getting frequency: {e}")
|
self.log.warning(f"Error getting frequency: {e}")
|
||||||
self.parameters['frequency'] = 'err'
|
self.parameters['frequency'] = 'err'
|
||||||
|
|
Loading…
Reference in a new issue