forked from openlp/openlp
Merge branch 'distutils' into 'master'
Get rid of distutils See merge request openlp/openlp!247
This commit is contained in:
commit
c8b328c4f5
@ -24,7 +24,6 @@ Download and "install" the remote web client
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from distutils.version import LooseVersion
|
|
||||||
from zipfile import ZipFile
|
from zipfile import ZipFile
|
||||||
|
|
||||||
from PyQt5 import QtCore
|
from PyQt5 import QtCore
|
||||||
@ -74,7 +73,8 @@ class RemoteVersionWorker(ThreadWorker):
|
|||||||
retries += 1
|
retries += 1
|
||||||
else:
|
else:
|
||||||
self.no_internet.emit()
|
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').setValue('api/last version test', date.today().strftime('%Y-%m-%d'))
|
||||||
Registry().get('settings_form').api_tab.master_version = version_info['latest']['version']
|
Registry().get('settings_form').api_tab.master_version = version_info['latest']['version']
|
||||||
self.new_version.emit(version_info['latest']['version'])
|
self.new_version.emit(version_info['latest']['version'])
|
||||||
|
@ -26,7 +26,6 @@ import platform
|
|||||||
import sys
|
import sys
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from distutils.version import LooseVersion
|
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from PyQt5 import QtCore
|
from PyQt5 import QtCore
|
||||||
@ -115,7 +114,8 @@ class VersionWorker(ThreadWorker):
|
|||||||
retries += 1
|
retries += 1
|
||||||
else:
|
else:
|
||||||
self.no_internet.emit()
|
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.new_version.emit(remote_version)
|
||||||
self.quit.emit()
|
self.quit.emit()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user