forked from openlp/openlp
parent
cae0c2eb09
commit
7c284ad520
@ -159,10 +159,10 @@ class BibleDB(Manager):
|
|||||||
if not isinstance(self.name, str):
|
if not isinstance(self.name, str):
|
||||||
self.name = str(self.name, 'utf-8')
|
self.name = str(self.name, 'utf-8')
|
||||||
# TODO: To path object
|
# TODO: To path object
|
||||||
file_path = Path(clean_filename(self.name) + '.sqlite')
|
self.file_path = Path(clean_filename(self.name) + '.sqlite')
|
||||||
if 'file' in kwargs:
|
if 'file' in kwargs:
|
||||||
file_path = kwargs['file']
|
self.file_path = kwargs['file']
|
||||||
Manager.__init__(self, 'bibles', init_schema, file_path, upgrade)
|
Manager.__init__(self, 'bibles', init_schema, self.file_path, upgrade)
|
||||||
if self.session and 'file' in kwargs:
|
if self.session and 'file' in kwargs:
|
||||||
self.get_name()
|
self.get_name()
|
||||||
self._is_web_bible = None
|
self._is_web_bible = None
|
||||||
|
@ -187,7 +187,7 @@ class BibleManager(LogMixin, RegistryProperties):
|
|||||||
bible = self.db_cache[name]
|
bible = self.db_cache[name]
|
||||||
bible.session.close_all()
|
bible.session.close_all()
|
||||||
bible.session = None
|
bible.session = None
|
||||||
return delete_file(Path(bible.path, bible.file))
|
return delete_file(bible.path, bible.file_path)
|
||||||
|
|
||||||
def get_bibles(self):
|
def get_bibles(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user