openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #02149
[Merge] lp:~raoul-snyman/openlp/version-fix into lp:openlp
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/version-fix into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Fix version checking.
--
https://code.launchpad.net/~raoul-snyman/openlp/version-fix/+merge/28589
Your team OpenLP Core is requested to review the proposed merge of lp:~raoul-snyman/openlp/version-fix into lp:openlp.
=== modified file 'openlp/.version'
--- openlp/.version 2010-05-23 15:49:34 +0000
+++ openlp/.version 2010-06-27 12:52:26 +0000
@@ -1,1 +1,1 @@
-1.9.1-bzr821
+1.9.2
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2010-06-19 11:43:05 +0000
+++ openlp/core/ui/mainwindow.py 2010-06-27 12:52:26 +0000
@@ -63,7 +63,7 @@
self.parent = parent
self.app_version = app_version
self.version_splitter = re.compile(
- r'([0-9]+).([0-9]+).([0-9]+)(?:-bzr([0-9]+))')
+ r'([0-9]+).([0-9]+).([0-9]+)(?:-bzr([0-9]+))?')
def run(self):
"""
@@ -79,14 +79,14 @@
remote_version[u'major'] = int(match.group(1))
remote_version[u'minor'] = int(match.group(2))
remote_version[u'release'] = int(match.group(3))
- if len(match.groups()) > 3:
+ if len(match.groups()) > 3 and match.group(4):
remote_version[u'revision'] = int(match.group(4))
match = self.version_splitter.match(self.app_version[u'full'])
if match:
local_version[u'major'] = int(match.group(1))
local_version[u'minor'] = int(match.group(2))
local_version[u'release'] = int(match.group(3))
- if len(match.groups()) > 3:
+ if len(match.groups()) > 3 and match.group(4):
local_version[u'revision'] = int(match.group(4))
if remote_version[u'major'] > local_version[u'major'] or \
remote_version[u'minor'] > local_version[u'minor'] or \
Follow ups