src/eric7/MicroPython/Devices/DeviceBase.py

branch
mpy_network
changeset 9803
2ab3de60b51c
parent 9802
22aeee2bf35f
child 9808
b68af9fd6a7a
--- a/src/eric7/MicroPython/Devices/DeviceBase.py	Sat Feb 25 19:47:23 2023 +0100
+++ b/src/eric7/MicroPython/Devices/DeviceBase.py	Sun Feb 26 12:44:03 2023 +0100
@@ -139,25 +139,29 @@
         else:
             return self._deviceData[key]
 
-    def checkDeviceData(self):
+    def checkDeviceData(self, quiet=True):
         """
         Public method to check the validity of the device data determined during
         connecting the device.
 
+        @param quiet flag indicating to not show an info message, if the data is
+            not available (defaults to True)
+        @type bool (optional)
         @return flag indicating valid device data
         @rtype bool
         """
         if bool(self._deviceData):
             return True
         else:
-            EricMessageBox.critical(
-                None,
-                self.tr("Show MicroPython Versions"),
-                self.tr(
-                    """<p>The device data is not available. Try to connect to the"""
-                    """ device again. Aborting...</p>"""
-                ).format(self.getDeviceType()),
-            )
+            if not quiet:
+                EricMessageBox.critical(
+                    None,
+                    self.tr("Device Data Not Available"),
+                    self.tr(
+                        """<p>The device data is not available. Try to connect to the"""
+                        """ device again. Aborting...</p>"""
+                    ).format(self.getDeviceType()),
+                )
             return False
 
     def hasCircuitPython(self):

eric ide

mercurial