From 69fbcf2fb5ee1efaf74f12eaff04c738990e8cba Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Fri, 8 May 2015 23:38:59 -0500 Subject: [PATCH] properly bootstrap the irc bot --- ircbot/dr.botzo.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ircbot/dr.botzo.py b/ircbot/dr.botzo.py index 8478975..d4d2c63 100644 --- a/ircbot/dr.botzo.py +++ b/ircbot/dr.botzo.py @@ -17,6 +17,7 @@ along with this program. If not, see . """ +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: