diff options
author | Diego Prado Gesto <d.pradogesto@ultimaker.com> | 2018-11-26 19:55:25 +0300 |
---|---|---|
committer | Diego Prado Gesto <d.pradogesto@ultimaker.com> | 2018-11-26 19:55:25 +0300 |
commit | fcc6af68af76db114875479066a63c8660785670 (patch) | |
tree | d426a9463c89bb640aa7fac6efb5a056f16a467c /plugins/FirmwareUpdateChecker | |
parent | 7019afe21f28c673815a365a1bab51259ea17d26 (diff) |
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.
Diffstat (limited to 'plugins/FirmwareUpdateChecker')
-rw-r--r-- | plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerJob.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerJob.py b/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerJob.py index 4c60b95824..9efd3e956a 100644 --- a/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerJob.py +++ b/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)) |