diff --git a/openlp/core/api/deploy.py b/openlp/core/api/deploy.py index 2e055ea5c..a9cf3b0b2 100644 --- a/openlp/core/api/deploy.py +++ b/openlp/core/api/deploy.py @@ -24,7 +24,6 @@ Download and "install" the remote web client import json import logging from datetime import date -from distutils.version import LooseVersion from zipfile import ZipFile from PyQt5 import QtCore @@ -74,7 +73,8 @@ class RemoteVersionWorker(ThreadWorker): retries += 1 else: self.no_internet.emit() - if version_info and LooseVersion(version_info['latest']['version']) > LooseVersion(self.current_version): + if version_info and (QtCore.QVersionNumber.fromString(version_info['latest']['version']) > + QtCore.QVersionNumber.fromString(self.current_version)): Registry().get('settings').setValue('api/last version test', date.today().strftime('%Y-%m-%d')) Registry().get('settings_form').api_tab.master_version = version_info['latest']['version'] self.new_version.emit(version_info['latest']['version']) diff --git a/openlp/core/version.py b/openlp/core/version.py index 8ced4b307..f2708b918 100644 --- a/openlp/core/version.py +++ b/openlp/core/version.py @@ -26,7 +26,6 @@ import platform import sys from collections import OrderedDict from datetime import date -from distutils.version import LooseVersion import requests from PyQt5 import QtCore @@ -115,7 +114,8 @@ class VersionWorker(ThreadWorker): retries += 1 else: self.no_internet.emit() - if remote_version and LooseVersion(remote_version) > LooseVersion(self.current_version['full']): + if remote_version and (QtCore.QVersionNumber.fromString(remote_version) > + QtCore.QVersionNumber.fromString(self.current_version['full'])): self.new_version.emit(remote_version) self.quit.emit()