what am I doing
This commit is contained in:
parent
bdcd4c9ae5
commit
74b6c1f9a7
3 changed files with 39 additions and 9 deletions
|
@ -5,6 +5,9 @@ import os
|
|||
import Queue
|
||||
import collections
|
||||
|
||||
from sqlalchemy.orm import scoped_session, sessionmaker
|
||||
from sqlalchemy import create_engine
|
||||
|
||||
from core import config, irc, main, loader
|
||||
|
||||
|
||||
|
@ -97,6 +100,11 @@ class Bot(object):
|
|||
self.config = config.Config(self.logger)
|
||||
self.logger.debug("Config object created.")
|
||||
|
||||
# db
|
||||
engine = create_engine('sqlite:///cloudbot.db')
|
||||
db_factory = sessionmaker(bind=engine)
|
||||
self.db_session = scoped_session(db_factory)
|
||||
|
||||
|
||||
def connect(self):
|
||||
"""connect to all the networks defined in the bot config"""
|
||||
|
|
Reference in a new issue