forked from openlp/openlp
Fail silently on version problems.
Renamed a variable to be a little more sensible.
This commit is contained in:
parent
cb778ecbfe
commit
3b1c151e15
@ -70,6 +70,8 @@ class VersionThread(QtCore.QThread):
|
|||||||
remote_version[u'release'] = int(match.group(3))
|
remote_version[u'release'] = int(match.group(3))
|
||||||
if len(match.groups()) > 3 and match.group(4):
|
if len(match.groups()) > 3 and match.group(4):
|
||||||
remote_version[u'revision'] = int(match.group(4))
|
remote_version[u'revision'] = int(match.group(4))
|
||||||
|
else:
|
||||||
|
return
|
||||||
match = self.version_splitter.match(self.app_version[u'full'])
|
match = self.version_splitter.match(self.app_version[u'full'])
|
||||||
if match:
|
if match:
|
||||||
local_version[u'major'] = int(match.group(1))
|
local_version[u'major'] = int(match.group(1))
|
||||||
@ -77,6 +79,8 @@ class VersionThread(QtCore.QThread):
|
|||||||
local_version[u'release'] = int(match.group(3))
|
local_version[u'release'] = int(match.group(3))
|
||||||
if len(match.groups()) > 3 and match.group(4):
|
if len(match.groups()) > 3 and match.group(4):
|
||||||
local_version[u'revision'] = int(match.group(4))
|
local_version[u'revision'] = int(match.group(4))
|
||||||
|
else:
|
||||||
|
return
|
||||||
if remote_version[u'major'] > local_version[u'major'] or \
|
if remote_version[u'major'] > local_version[u'major'] or \
|
||||||
remote_version[u'minor'] > local_version[u'minor'] or \
|
remote_version[u'minor'] > local_version[u'minor'] or \
|
||||||
remote_version[u'release'] > local_version[u'release']:
|
remote_version[u'release'] > local_version[u'release']:
|
||||||
@ -147,10 +151,10 @@ class AppLocation(object):
|
|||||||
return plugin_path
|
return plugin_path
|
||||||
elif dir_type == AppLocation.VersionDir:
|
elif dir_type == AppLocation.VersionDir:
|
||||||
if hasattr(sys, u'frozen') and sys.frozen == 1:
|
if hasattr(sys, u'frozen') and sys.frozen == 1:
|
||||||
plugin_path = os.path.abspath(os.path.split(sys.argv[0])[0])
|
version_path = os.path.abspath(os.path.split(sys.argv[0])[0])
|
||||||
else:
|
else:
|
||||||
plugin_path = os.path.split(openlp.__file__)[0]
|
version_path = os.path.split(openlp.__file__)[0]
|
||||||
return plugin_path
|
return version_path
|
||||||
elif dir_type == AppLocation.CacheDir:
|
elif dir_type == AppLocation.CacheDir:
|
||||||
if sys.platform == u'win32':
|
if sys.platform == u'win32':
|
||||||
path = os.path.join(os.getenv(u'APPDATA'), u'openlp')
|
path = os.path.join(os.getenv(u'APPDATA'), u'openlp')
|
||||||
|
Loading…
Reference in New Issue
Block a user