Browse Source

Don't show the current checked version of the firmware if the version number we gather is ZERO. That means that there was a problem getting the right value.

Contributes to CURA-5980.
Diego Prado Gesto 6 years ago
parent
commit
fcc6af68af
1 changed files with 5 additions and 0 deletions
  1. 5 0
      plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerJob.py

+ 5 - 0
plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerJob.py

@@ -93,6 +93,11 @@ class FirmwareUpdateCheckerJob(Job):
 
                 current_version = self.getCurrentVersion()
 
+                # This case indicates that was an error checking the version.
+                # It happens for instance when not connected to internet.
+                if current_version == self.ZERO_VERSION:
+                    return
+
                 # If it is the first time the version is checked, the checked_version is ""
                 setting_key_str = getSettingsKeyForMachine(machine_id)
                 checked_version = Version(Application.getInstance().getPreferences().getValue(setting_key_str))