mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
improved config file error handling
This commit is contained in:
parent
7cd01e1e74
commit
4b5622647e
|
@ -264,7 +264,7 @@ if __name__ == "__main__":
|
||||||
if ARGS.configfile:
|
if ARGS.configfile:
|
||||||
# init config
|
# init config
|
||||||
config = config.CONFIG().read_config()
|
config = config.CONFIG().read_config()
|
||||||
|
try:
|
||||||
# additional step for being sure our callsign is correctly
|
# additional step for being sure our callsign is correctly
|
||||||
# in case we are not getting a station ssid
|
# in case we are not getting a station ssid
|
||||||
# then we are forcing a station ssid = 0
|
# then we are forcing a station ssid = 0
|
||||||
|
@ -308,7 +308,10 @@ if __name__ == "__main__":
|
||||||
static.RESPOND_TO_CQ = config['TNC']['qrv']
|
static.RESPOND_TO_CQ = config['TNC']['qrv']
|
||||||
static.RX_BUFFER_SIZE = config['TNC']['rxbuffersize']
|
static.RX_BUFFER_SIZE = config['TNC']['rxbuffersize']
|
||||||
static.ENABLE_EXPLORER = config['TNC']['explorer']
|
static.ENABLE_EXPLORER = config['TNC']['explorer']
|
||||||
|
except KeyError as e:
|
||||||
|
log.warning("[CFG] Error reading config file near", key=str(e))
|
||||||
|
except Exception as e:
|
||||||
|
log.warning("[CFG] Error", e=e)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# additional step for being sure our callsign is correctly
|
# additional step for being sure our callsign is correctly
|
||||||
|
|
Loading…
Reference in a new issue