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:
Tim Bentley 2009-03-11 06:39:11 +00:00
parent 5c3136fdbe
commit cf2067fb61
2 changed files with 13 additions and 14 deletions

View File

@ -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)

View File

@ -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')
# #