diff --git a/dr.botzo.py b/dr.botzo.py index eddc527..7f73642 100644 --- a/dr.botzo.py +++ b/dr.botzo.py @@ -14,6 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . + """ from ConfigParser import ConfigParser, NoSectionError, NoOptionError @@ -45,9 +46,11 @@ try: botuser = config.get('dr.botzo', 'user') botircname = config.get('dr.botzo', 'name') except NoSectionError as e: - sys.exit("Aborted due to error with necessary configuration: " + str(e)) + sys.exit("Aborted due to error with necessary configuration: " + "{0:s}".format(str(e))) except NoOptionError as e: - sys.exit("Aborted due to error with necessary configuration: " + str(e)) + sys.exit("Aborted due to error with necessary configuration: " + "{0:s}".format(str(e))) logging.config.fileConfig('logging.cfg') log = logging.getLogger('drbotzo') @@ -79,13 +82,15 @@ try: db.commit() finally: cur.close() except NoOptionError as e: - sys.exit("Aborted due to error with necessary configuration: " + str(e)) + sys.exit("Aborted due to error with necessary configuration: " + "{0:s}".format(str(e))) # start up the IRC bot # create IRC and server objects and connect irc = DrBotIRC.DrBotIRC(config) -server = irc.server().connect(botserver, botport, botnick, botpass, botuser, botircname) +server = irc.server().connect(botserver, botport, botnick, botpass, + botuser, botircname) # load features try: @@ -95,7 +100,8 @@ try: for mod in mods: irc.load_module(mod) except NoOptionError as e: - log.warning("You seem to be missing a module_list config option, which you probably wanted.") + log.warning("You seem to be missing a module_list config option, which " + "you probably wanted.") # loop forever irc.process_forever()