catch config file reading error closes #273

This commit is contained in:
DJ2LS 2022-11-09 12:23:59 +01:00
parent 508fbe05af
commit 553013cbb4

View file

@ -305,6 +305,7 @@ if __name__ == "__main__":
# additional step for being sure our callsign is correctly
# in case we are not getting a station ssid
# then we are forcing a station ssid = 0
try:
mycallsign = bytes(ARGS.mycall.upper(), "utf-8")
mycallsign = helpers.callsign_to_bytes(mycallsign)
static.MYCALLSIGN = helpers.bytes_to_callsign(mycallsign)
@ -336,6 +337,8 @@ if __name__ == "__main__":
static.RESPOND_TO_CQ = ARGS.enable_respond_to_cq
static.RX_BUFFER_SIZE = ARGS.rx_buffer_size
static.ENABLE_EXPLORER = ARGS.enable_explorer
except Exception as e:
log.error("[DMN] Error reading config file", exception=e)
# we need to wait until we got all parameters from argparse first before we can load the other modules
import sock