forked from openlp/openlp
Fixes for the first Alpha:
* Handle git styled version tags/hashes instead of bzr. Fixes part of #351. * Fix planningcenter traceback, fixes #354. * Fix minor stuff detected by pylint.
This commit is contained in:
parent
9034d140bf
commit
b54a9931bd
@ -74,4 +74,4 @@ class SingleColumnTableWidget(QtWidgets.QTableWidget):
|
|||||||
self.resizeRowsToContents()
|
self.resizeRowsToContents()
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['AlertLocation', 'DisplayControllerType', 'HideMode', 'SingleColumnTableWidget']
|
__all__ = ['DisplayControllerType', 'HideMode', 'SingleColumnTableWidget']
|
||||||
|
@ -147,7 +147,7 @@ class VlcPlayer(MediaPlayer):
|
|||||||
"""
|
"""
|
||||||
return get_vlc() is not None
|
return get_vlc() is not None
|
||||||
|
|
||||||
def load(self, controller, output_display, file):
|
def load(self, controller, output_display, file=None):
|
||||||
"""
|
"""
|
||||||
Load a video into VLC
|
Load a video into VLC
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ class VersionWorker(ThreadWorker):
|
|||||||
|
|
||||||
**Rules around versions and version files:**
|
**Rules around versions and version files:**
|
||||||
|
|
||||||
* If a version number has a build (i.e. -bzr1234), then it is a nightly.
|
* If a version number has a revision hash (i.e. g9034d140b), then it is a nightly.
|
||||||
* If a version number's minor version is an odd number, it is a development release.
|
* If a version number's minor version is an odd number, it is a development release.
|
||||||
* If a version number's minor version is an even number, it is a stable release.
|
* If a version number's minor version is an even number, it is a stable release.
|
||||||
"""
|
"""
|
||||||
@ -143,7 +143,9 @@ def get_version():
|
|||||||
"""
|
"""
|
||||||
Returns the application version of the running instance of OpenLP::
|
Returns the application version of the running instance of OpenLP::
|
||||||
|
|
||||||
{'full': '1.9.4-bzr1249', 'version': '1.9.4', 'build': 'bzr1249'}
|
{'full': '2.9.0.dev2963+97ba02d1f', 'version': '2.9.0', 'build': '97ba02d1f'}
|
||||||
|
or
|
||||||
|
{'full': '2.9.0', 'version': '2.9.0', 'build': None}
|
||||||
"""
|
"""
|
||||||
global APPLICATION_VERSION
|
global APPLICATION_VERSION
|
||||||
if APPLICATION_VERSION:
|
if APPLICATION_VERSION:
|
||||||
@ -154,11 +156,11 @@ def get_version():
|
|||||||
except OSError:
|
except OSError:
|
||||||
log.exception('Error in version file.')
|
log.exception('Error in version file.')
|
||||||
full_version = '0.0.0'
|
full_version = '0.0.0'
|
||||||
bits = full_version.split('-')
|
bits = full_version.split('.dev')
|
||||||
APPLICATION_VERSION = {
|
APPLICATION_VERSION = {
|
||||||
'full': full_version,
|
'full': full_version,
|
||||||
'version': bits[0],
|
'version': bits[0],
|
||||||
'build': bits[1] if len(bits) > 1 else None
|
'build': full_version.split('+')[1] if '+' in full_version else None
|
||||||
}
|
}
|
||||||
if APPLICATION_VERSION['build']:
|
if APPLICATION_VERSION['build']:
|
||||||
log.info('OpenLP version {version} build {build}'.format(version=APPLICATION_VERSION['version'],
|
log.info('OpenLP version {version} build {build}'.format(version=APPLICATION_VERSION['version'],
|
||||||
|
@ -81,7 +81,7 @@ class SelectPlanForm(QtWidgets.QDialog, Ui_SelectPlanDialog):
|
|||||||
self.on_plan_selection_combobox_changed()
|
self.on_plan_selection_combobox_changed()
|
||||||
# Set the 2 lists of themes
|
# Set the 2 lists of themes
|
||||||
theme_manager = Registry().get('theme_manager')
|
theme_manager = Registry().get('theme_manager')
|
||||||
for theme in theme_manager.get_themes():
|
for theme in theme_manager.get_theme_names():
|
||||||
self.song_theme_selection_combo_box.addItem(theme)
|
self.song_theme_selection_combo_box.addItem(theme)
|
||||||
self.slide_theme_selection_combo_box.addItem(theme)
|
self.slide_theme_selection_combo_box.addItem(theme)
|
||||||
|
|
||||||
|
@ -21,8 +21,7 @@
|
|||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from lxml import objectify
|
from lxml import objectify, etree
|
||||||
from lxml.etree import Error, LxmlError
|
|
||||||
|
|
||||||
from openlp.core.common import normalize_str
|
from openlp.core.common import normalize_str
|
||||||
from openlp.core.common.i18n import translate
|
from openlp.core.common.i18n import translate
|
||||||
@ -130,7 +129,7 @@ class OpenSongImport(SongImport):
|
|||||||
self.set_defaults()
|
self.set_defaults()
|
||||||
try:
|
try:
|
||||||
tree = objectify.parse(file)
|
tree = objectify.parse(file)
|
||||||
except (Error, LxmlError):
|
except (etree.Error, etree.LxmlError):
|
||||||
self.log_error(file.name, SongStrings.XMLSyntaxError)
|
self.log_error(file.name, SongStrings.XMLSyntaxError)
|
||||||
log.exception('Error parsing XML')
|
log.exception('Error parsing XML')
|
||||||
return
|
return
|
||||||
|
@ -75,8 +75,8 @@ class TestSelectPlanForm(TestCase, TestMixin):
|
|||||||
self.form.planning_center_api.airplane_mode = True
|
self.form.planning_center_api.airplane_mode = True
|
||||||
self.form.planning_center_api.airplane_mode_directory = TEST_PATH
|
self.form.planning_center_api.airplane_mode_directory = TEST_PATH
|
||||||
self.theme_manager = ThemeManager(None)
|
self.theme_manager = ThemeManager(None)
|
||||||
self.theme_manager.get_themes = MagicMock()
|
self.theme_manager.get_theme_names = MagicMock()
|
||||||
self.theme_manager.get_themes.return_value = ['themeA', 'themeB']
|
self.theme_manager.get_theme_names.return_value = ['themeA', 'themeB']
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user