dr.botzo, Module: misc cleaning up of old crap
This commit is contained in:
parent
d6561bf221
commit
f017422e69
@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
from ConfigParser import NoSectionError, NoOptionError
|
from ConfigParser import NoSectionError, NoOptionError
|
||||||
|
|
||||||
import inspect
|
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
@ -20,24 +20,18 @@ from ConfigParser import ConfigParser, NoSectionError, NoOptionError
|
|||||||
import logging
|
import logging
|
||||||
import logging.config
|
import logging.config
|
||||||
import os
|
import os
|
||||||
import re
|
|
||||||
import sys
|
import sys
|
||||||
import inspect
|
|
||||||
import sqlite3
|
import sqlite3
|
||||||
|
|
||||||
import DrBotIRC
|
import DrBotIRC
|
||||||
from extlib import irclib
|
from extlib import irclib
|
||||||
|
|
||||||
moduleList = [ "Countdown", "Dice", "IrcAdmin", "GoogleTranslate", "Seen", "FactFile" ]
|
|
||||||
modObjs = []
|
|
||||||
|
|
||||||
config_file = 'dr.botzo.cfg'
|
config_file = 'dr.botzo.cfg'
|
||||||
# check argv
|
# check argv
|
||||||
if len(sys.argv) == 2:
|
if len(sys.argv) == 2:
|
||||||
config_file = sys.argv[1]
|
config_file = sys.argv[1]
|
||||||
|
|
||||||
# read config file
|
# read config file
|
||||||
|
|
||||||
config = ConfigParser({'debug': 'false'})
|
config = ConfigParser({'debug': 'false'})
|
||||||
config.read(os.path.expanduser(config_file))
|
config.read(os.path.expanduser(config_file))
|
||||||
|
|
||||||
@ -100,8 +94,6 @@ try:
|
|||||||
mods = cfgmodlist.split(',')
|
mods = cfgmodlist.split(',')
|
||||||
for mod in mods:
|
for mod in mods:
|
||||||
irc.load_module(mod)
|
irc.load_module(mod)
|
||||||
except NoSectionError as e:
|
|
||||||
log.error("You seem to be missing a modules config section, which you probably wanted.")
|
|
||||||
except NoOptionError as e:
|
except NoOptionError as e:
|
||||||
log.error("You seem to be missing a modlist config option, which you probably wanted.")
|
log.error("You seem to be missing a modlist config option, which you probably wanted.")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user