forked from openlp/openlp
Get rid of distutils
This commit is contained in:
parent
a61541a6ad
commit
dc967baf00
@ -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'])
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user