src/eric7/MicroPython/Devices/DeviceBase.py

branch
eric7
changeset 9804
b7e200d35be9
parent 9801
f2da2c1ab424
child 9829
cafb132fe3bb
diff -r f2da2c1ab424 -r b7e200d35be9 src/eric7/MicroPython/Devices/DeviceBase.py
--- a/src/eric7/MicroPython/Devices/DeviceBase.py	Sat Feb 25 19:43:06 2023 +0100
+++ b/src/eric7/MicroPython/Devices/DeviceBase.py	Sun Feb 26 12:45:22 2023 +0100
@@ -112,25 +112,29 @@
         """
         return copy.deepcopy(self._deviceData)
 
-    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("Show MicroPython Versions"),
+                    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