src/eric7/MicroPython/Devices/DeviceBase.py

branch
eric7
changeset 9804
b7e200d35be9
parent 9801
f2da2c1ab424
child 9829
cafb132fe3bb
equal deleted inserted replaced
9801:f2da2c1ab424 9804:b7e200d35be9
110 @return dictionary containing the essential device data 110 @return dictionary containing the essential device data
111 @rtype dict 111 @rtype dict
112 """ 112 """
113 return copy.deepcopy(self._deviceData) 113 return copy.deepcopy(self._deviceData)
114 114
115 def checkDeviceData(self): 115 def checkDeviceData(self, quiet=True):
116 """ 116 """
117 Public method to check the validity of the device data determined during 117 Public method to check the validity of the device data determined during
118 connecting the device. 118 connecting the device.
119 119
120 @param quiet flag indicating to not show an info message, if the data is
121 not available (defaults to True)
122 @type bool (optional)
120 @return flag indicating valid device data 123 @return flag indicating valid device data
121 @rtype bool 124 @rtype bool
122 """ 125 """
123 if bool(self._deviceData): 126 if bool(self._deviceData):
124 return True 127 return True
125 else: 128 else:
126 EricMessageBox.critical( 129 if not quiet:
127 None, 130 EricMessageBox.critical(
128 self.tr("Show MicroPython Versions"), 131 None,
129 self.tr( 132 self.tr("Show MicroPython Versions"),
130 """<p>The device data is not available. Try to connect to the""" 133 self.tr(
131 """ device again. Aborting...</p>""" 134 """<p>The device data is not available. Try to connect to the"""
132 ).format(self.getDeviceType()), 135 """ device again. Aborting...</p>"""
133 ) 136 ).format(self.getDeviceType()),
137 )
134 return False 138 return False
135 139
136 def hasCircuitPython(self): 140 def hasCircuitPython(self):
137 """ 141 """
138 Public method to check, if the connected device is flashed with CircuitPython. 142 Public method to check, if the connected device is flashed with CircuitPython.

eric ide

mercurial