Add OpenLPMixin to bible importer

This commit is contained in:
Philip Ridout 2016-08-09 20:32:29 +01:00
parent 27731dbbbc
commit 74607afbfc
2 changed files with 3 additions and 6 deletions

View File

@ -24,20 +24,19 @@ import logging
from lxml import etree, objectify
from openlp.core.common import languages
from openlp.core.common import OpenLPMixin, languages
from openlp.core.lib import ValidationError
from openlp.plugins.bibles.lib.db import BibleDB, BiblesResourcesDB
log = logging.getLogger(__name__)
class BibleImport(BibleDB):
class BibleImport(OpenLPMixin, BibleDB):
"""
Helper class to import bibles from a third party source into OpenLP
"""
# TODO: Test
def __init__(self, *args, **kwargs):
log.debug(self.__class__.__name__)
super().__init__(*args, **kwargs)
self.filename = kwargs['filename'] if 'filename' in kwargs else None

View File

@ -53,11 +53,9 @@ import csv
import logging
from collections import namedtuple
from openlp.core.common import translate
from openlp.core.lib import get_file_encoding
from openlp.core.common import get_file_encoding, translate
from openlp.core.lib.exceptions import ValidationError
from openlp.plugins.bibles.lib.bibleimport import BibleImport
from openlp.plugins.bibles.lib.db import BiblesResourcesDB
log = logging.getLogger(__name__)