require config file on the command line
This commit is contained in:
parent
466eb6eff1
commit
599106e447
@ -76,10 +76,15 @@ class DrBotIRC(irclib.IRC):
|
|||||||
self.connections.append(c)
|
self.connections.append(c)
|
||||||
return c
|
return c
|
||||||
|
|
||||||
|
# check argv
|
||||||
|
if len(sys.argv) != 2:
|
||||||
|
sys.exit("Needs one argument, the config filename")
|
||||||
|
|
||||||
# read config file
|
# read config file
|
||||||
|
|
||||||
config = ConfigParser({'debug': 'false'})
|
config = ConfigParser({'debug': 'false'})
|
||||||
config.read([os.path.expanduser('~/.dr.botzo.cfg'), 'dr.botzo.cfg'])
|
#config.read([os.path.expanduser('~/.dr.botzo.cfg'), 'dr.botzo.cfg'])
|
||||||
|
config.read(os.path.expanduser(sys.argv[1]))
|
||||||
|
|
||||||
# load necessary options
|
# load necessary options
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user