Tue, 15 Apr 2025 17:13:08 +0200
Removed some obsolete code caused by copy and paste.
src/eric7/MicroPython/Devices/Nrf52Devices.py | file | annotate | diff | comparison | revisions |
--- a/src/eric7/MicroPython/Devices/Nrf52Devices.py Tue Apr 15 15:45:24 2025 +0200 +++ b/src/eric7/MicroPython/Devices/Nrf52Devices.py Tue Apr 15 17:13:08 2025 +0200 @@ -213,11 +213,7 @@ ), ) else: - if self._deviceData["mpy_variant"] == "Pimoroni Pico": - # MicroPython with Pimoroni add-on libraries - url = QUrl(FirmwareGithubUrls["pimoroni_pico"]) - else: - url = QUrl(FirmwareGithubUrls["micropython"]) + url = QUrl(FirmwareGithubUrls["micropython"]) ui = ericApp().getObject("UserInterface") request = QNetworkRequest(url) reply = ui.networkAccessManager().head(request) @@ -242,11 +238,7 @@ currentVersionStr = self.tr("unknown") currentVersion = (0, 0, 0) else: - currentVersionStr = ( - self._deviceData["mpy_variant_version"] - if bool(self._deviceData["mpy_variant_version"]) - else self._deviceData["mpy_version"] - ) + currentVersionStr = self._deviceData["mpy_version"] currentVersion = EricUtilities.versionToTuple(currentVersionStr) msg = self.tr( @@ -259,20 +251,9 @@ ).format( currentVersionStr, tag, - ( - self.tr("<tr><td>Variant:</td><td>{0}</td></tr>").format( - self._deviceData["mpy_variant"] - ) - if self._deviceData["mpy_variant"] - else "" - ), + "", ) - if self._deviceData["mpy_variant"] in ["Pimoroni Pico"] and not bool( - self._deviceData["mpy_variant_version"] - ): - # cannot derive update info - msg += self.tr("<p>Update may be available.</p>") - elif currentVersion < latestVersion: + if currentVersion < latestVersion: msg += self.tr("<p><b>Update available!</b></p>") EricMessageBox.information(