dr.botzo.py: whitespace/string cleanups
shockingly minor, it's a small file but i was expecting more egregious code than there actually was
This commit is contained in:
parent
bf6a5c5352
commit
1ec2747f3e
16
dr.botzo.py
16
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
"""
|
||||
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user