Removed some obsolete code caused by copy and paste. eric7

Tue, 15 Apr 2025 17:13:08 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 15 Apr 2025 17:13:08 +0200
branch
eric7
changeset 11221
6c05da6f8b0e
parent 11220
044ea8893b81
child 11222
42441412dc29

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(

eric ide

mercurial