diff --git a/dr.botzo.py b/dr.botzo.py index 3a461cd..66aa23e 100644 --- a/dr.botzo.py +++ b/dr.botzo.py @@ -69,14 +69,15 @@ class DrBotIRC(irclib.IRC): self.connections.append(c) return c +config_file = 'dr.botzo.cfg' # check argv -if len(sys.argv) != 2: - sys.exit("Needs one argument, the config filename") +if len(sys.argv) == 2: + config_file = sys.argv[1] # read config file config = ConfigParser({'debug': 'false'}) -config.read(os.path.expanduser(sys.argv[1])) +config.read(os.path.expanduser(config_file)) # load necessary options try: