src/eric7/MicroPython/CircuitPythonUpdater/CircupFunctions.py

branch
eric7
changeset 9748
df9520c864f2
parent 9740
90072e10ae9b
equal deleted inserted replaced
9747:b7976868d5b0 9748:df9520c864f2
133 with open(os.path.join(device_path, "boot_out.txt")) as boot: 133 with open(os.path.join(device_path, "boot_out.txt")) as boot:
134 version_line = boot.readline() 134 version_line = boot.readline()
135 circuit_python = version_line.split(";")[0].split(" ")[-3] 135 circuit_python = version_line.split(";")[0].split(" ")[-3]
136 board_line = boot.readline() 136 board_line = boot.readline()
137 board_id = ( 137 board_id = (
138 board_line[9:].strip() 138 board_line[9:].strip() if board_line.startswith("Board ID:") else ""
139 if board_line.startswith("Board ID:")
140 else ""
141 ) 139 )
142 except FileNotFoundError: 140 except FileNotFoundError:
143 EricMessageBox.critical( 141 EricMessageBox.critical(
144 None, 142 None,
145 QCoreApplication.translate("CircupFunctions", "Download Bundle"), 143 QCoreApplication.translate("CircupFunctions", "Download Bundle"),

eric ide

mercurial