Skip to content
Snippets Groups Projects
Commit cc6929a8 authored by Robin Mueller's avatar Robin Mueller
Browse files

removed obsolete block

parent aa9a2f4f
No related branches found
No related tags found
No related merge requests found
...@@ -70,23 +70,21 @@ def set_communication_interface(tmtc_printer: TmTcPrinter) -> Union[Communicatio ...@@ -70,23 +70,21 @@ def set_communication_interface(tmtc_printer: TmTcPrinter) -> Union[Communicatio
def determine_com_port() -> str: def determine_com_port() -> str:
reconfigure_com_port = False reconfigure_com_port = False
com_port = "" com_port = ""
if g.G_COM_PORT is None:
if os.path.isfile("config/tmtcc_config.json"): if os.path.isfile("config/tmtcc_config.json"):
with open("config/tmtcc_config.json", "r") as write: with open("config/tmtcc_config.json", "r") as write:
load_data = json.load(write) load_data = json.load(write)
com_port = load_data["COM_PORT"] com_port = load_data["COM_PORT"]
if not check_port_validity(com_port): if not check_port_validity(com_port):
reconfigure = input( reconfigure = input(
"COM port from configuration file not contained within serial" "COM port from configuration file not contained within serial"
"port list. Reconfigure serial port? [y/n]: ") "port list. Reconfigure serial port? [y/n]: ")
if reconfigure.lower() in ['y', "yes"]: if reconfigure.lower() in ['y', "yes"]:
write.close() write.close()
os.remove("config/tmtcc_config.json") os.remove("config/tmtcc_config.json")
reconfigure_com_port = True reconfigure_com_port = True
else:
reconfigure_com_port = True
else: else:
com_port = g.G_COM_PORT reconfigure_com_port = True
if reconfigure_com_port: if reconfigure_com_port:
com_port = prompt_com_port() com_port = prompt_com_port()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment