properly bootstrap the irc bot
This commit is contained in:
parent
ad30f2e263
commit
69fbcf2fb5
|
@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import django
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
from ConfigParser import ConfigParser, NoSectionError, NoOptionError
|
from ConfigParser import ConfigParser, NoSectionError, NoOptionError
|
||||||
|
@ -25,13 +26,14 @@ import logging.config
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# gross hack
|
|
||||||
sys.path.insert(0, '../dr_botzo')
|
|
||||||
|
|
||||||
import MySQLdb as mdb
|
import MySQLdb as mdb
|
||||||
|
|
||||||
import DrBotIRC
|
import DrBotIRC
|
||||||
|
|
||||||
|
# gross hack to get to django
|
||||||
|
sys.path.insert(0, '../dr_botzo')
|
||||||
|
django.setup()
|
||||||
|
|
||||||
config_file = 'dr.botzo.cfg'
|
config_file = 'dr.botzo.cfg'
|
||||||
# check argv
|
# check argv
|
||||||
if len(sys.argv) == 2:
|
if len(sys.argv) == 2:
|
||||||
|
|
Loading…
Reference in New Issue