forked from openlp/openlp
Fix Custom plugin to add it self to config if not present.
Correct spacing error in code. bzr-revno: 407
This commit is contained in:
parent
5c3136fdbe
commit
cf2067fb61
@ -44,7 +44,6 @@ class BibleCSVImpl(BibleCommon):
|
|||||||
fbooks=open(booksfile, 'r')
|
fbooks=open(booksfile, 'r')
|
||||||
fverse=open(versesfile, 'r')
|
fverse=open(versesfile, 'r')
|
||||||
|
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
for line in fbooks:
|
for line in fbooks:
|
||||||
#log.debug( line)
|
#log.debug( line)
|
||||||
|
@ -45,19 +45,19 @@ class CustomManager():
|
|||||||
self.config = config
|
self.config = config
|
||||||
log.debug('Custom Initialising')
|
log.debug('Custom Initialising')
|
||||||
self.db_url = u''
|
self.db_url = u''
|
||||||
# db_type = self.config.get_config(u'db type')
|
db_type = self.config.get_config(u'db type', u'sqlite')
|
||||||
# if db_type == u'sqlite':
|
if db_type == u'sqlite':
|
||||||
# self.db_url = u'sqlite:///' + self.config.get_data_path() + \
|
self.db_url = u'sqlite:///' + self.config.get_data_path() + \
|
||||||
# u'/custom.sqlite'
|
u'/custom.sqlite'
|
||||||
# else:
|
else:
|
||||||
# self.db_url = u'%s://%s:%s@%s/%s' % \
|
self.db_url = u'%s://%s:%s@%s/%s' % \
|
||||||
# (db_type, self.config.get_config(u'db username'),
|
(db_type, self.config.get_config(u'db username'),
|
||||||
# self.config.get_config(u'db password'),
|
self.config.get_config(u'db password'),
|
||||||
# self.config.get_config(u'db hostname'),
|
self.config.get_config(u'db hostname'),
|
||||||
# self.config.get_config(u'db database'))
|
self.config.get_config(u'db database'))
|
||||||
# self.session = init_models(self.db_url)
|
self.session = init_models(self.db_url)
|
||||||
# if not custom_slide_table.exists():
|
if not custom_slide_table.exists():
|
||||||
# metadata.create_all()
|
metadata.create_all()
|
||||||
|
|
||||||
log.debug('Custom Initialised')
|
log.debug('Custom Initialised')
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user