properly bootstrap the irc bot

This commit is contained in:
Brian S. Stephan 2015-05-08 23:38:59 -05:00
parent ad30f2e263
commit 69fbcf2fb5
1 changed files with 5 additions and 3 deletions

View File

@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
import django
from django.conf import settings
from ConfigParser import ConfigParser, NoSectionError, NoOptionError
@ -25,13 +26,14 @@ import logging.config
import os
import sys
# gross hack
sys.path.insert(0, '../dr_botzo')
import MySQLdb as mdb
import DrBotIRC
# gross hack to get to django
sys.path.insert(0, '../dr_botzo')
django.setup()
config_file = 'dr.botzo.cfg'
# check argv
if len(sys.argv) == 2: