src/eric7/MicroPython/CircuitPythonDevices.py

branch
eric7
changeset 9747
b7976868d5b0
parent 9746
37d460e32843
child 9749
5d409223cf3f
--- a/src/eric7/MicroPython/CircuitPythonDevices.py	Tue Feb 07 11:01:29 2023 +0100
+++ b/src/eric7/MicroPython/CircuitPythonDevices.py	Tue Feb 07 18:07:12 2023 +0100
@@ -23,7 +23,7 @@
     CircuitPythonUpdaterInterface,
     isCircupAvailable,
 )
-from .MicroPythonDevices import MicroPythonDevice
+from .MicroPythonDevices import FirmwareGithubUrls, MicroPythonDevice
 from .MicroPythonWidget import HAS_QTCHART
 
 
@@ -33,7 +33,6 @@
     """
 
     DeviceVolumeName = "CIRCUITPY"
-    GitHubFirmwareUrl = "https://github.com/adafruit/circuitpython/releases/latest"
 
     def __init__(self, microPythonWidget, deviceType, boardName, parent=None):
         """
@@ -254,7 +253,7 @@
         self.__libraryMenu.aboutToShow.connect(self.__aboutToShowLibraryMenu)
         self.__libraryMenu.setTearOffEnabled(True)
 
-        act = menu.addAction(
+        menu.addAction(
             self.tr("Show CircuitPython Versions"), self.__showCircuitPythonVersions
         )
         act = menu.addAction(
@@ -340,7 +339,7 @@
         the latest available one (from Github).
         """
         ui = ericApp().getObject("UserInterface")
-        request = QNetworkRequest(QUrl(CircuitPythonDevice.GitHubFirmwareUrl))
+        request = QNetworkRequest(QUrl(FirmwareGithubUrls["circuitpython"]))
         reply = ui.networkAccessManager().head(request)
         reply.finished.connect(lambda: self.__cpyVersionResponse(reply))
 

eric ide

mercurial