From 257c9d446ec6417abf0259bc06671937e0de47d3 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Thu, 26 Jul 2012 20:43:21 -0500 Subject: [PATCH] dr.botzo: abort if the database isn't set it's become pretty important, and is only going to get moreso --- dr.botzo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dr.botzo.py b/dr.botzo.py index 89425be..d71d8e9 100644 --- a/dr.botzo.py +++ b/dr.botzo.py @@ -75,8 +75,8 @@ try: conn.execute(query) conn.commit() finally: conn.close() -except NoOptionError: pass # if the config file has no db property, assume that -except NoSectionError: pass # the database doesn't need to exist +except NoOptionError as e: + sys.exit("Aborted due to error with necessary configuration: " + str(e)) # start up the IRC bot