CURA-2079: Rework on adding detailed error messages to firmware updater

This commit is contained in:
Thomas Karl Pietrowski 2016-08-17 22:34:04 +02:00
parent e72a10c97a
commit c174ce4396
3 changed files with 67 additions and 66 deletions

View file

@ -38,8 +38,6 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin, Extension):
self._update_thread = threading.Thread(target = self._updateThread)
self._update_thread.setDaemon(True)
self._errorCode = 0
self._check_updates = True
self._firmware_view = None
@ -61,7 +59,10 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin, Extension):
@pyqtProperty(int, notify = progressChanged)
def errorCode(self):
return self._errorCode
for printer_name, device in self._usb_output_devices.items(): # TODO: @UnusedVariable "printer_name"
if device._error_code:
return device._error_code
return 0
## Return True if all printers finished firmware update
@pyqtProperty(float, notify = firmwareUpdateChange)