362 if os.path.exists(bootFile): |
362 if os.path.exists(bootFile): |
363 with open(bootFile, "r") as f: |
363 with open(bootFile, "r") as f: |
364 line = f.readline() |
364 line = f.readline() |
365 cpyVersionStr = line.split(";")[0].split()[2] |
365 cpyVersionStr = line.split(";")[0].split()[2] |
366 cpyVersion = Globals.versionToTuple(cpyVersionStr) |
366 cpyVersion = Globals.versionToTuple(cpyVersionStr) |
|
367 if cpyVersion == (0, 0, 0) and self.microPython.isConnected(): |
|
368 # drive is not mounted or 'boot_out.txt' is missing but the device |
|
369 # is connected via the serial console |
|
370 interface = self.microPython.commandsInterface() |
|
371 if interface is not None: |
|
372 impInfo = interface.getImplementation() |
|
373 if impInfo["version"] != "unknown": |
|
374 cpyVersionStr = impInfo["version"] |
|
375 cpyVersion = Globals.versionToTuple(cpyVersionStr) |
367 |
376 |
368 msg = self.tr( |
377 msg = self.tr( |
369 "<h4>CircuitPython Version Information</h4>" |
378 "<h4>CircuitPython Version Information</h4>" |
370 "<table>" |
379 "<table>" |
371 "<tr><td>Installed:</td><td>{0}</td></tr>" |
380 "<tr><td>Installed:</td><td>{0}</td></tr>" |