From 971f041b74867eae2cefd25c203e3a61e4125f44 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Tue, 28 Sep 2010 18:46:01 +0200 Subject: Added some proper traceback output. --- fot.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fot.py b/fot.py index d85ace8..2bb51af 100755 --- a/fot.py +++ b/fot.py @@ -6,7 +6,7 @@ from twisted.python import log from twisted.protocols.basic import LineReceiver from twisted._version import version as twisted_version -import os, re, platform +import os, re, platform, sys, traceback from ConfigParser import ConfigParser @@ -129,8 +129,8 @@ class Bot(irc.IRCClient): if priv or mod in self.module_channels[channel]: try: mod.privmsg(nick, channel, msg) - except Exception as e: - print e + except: + traceback.print_exc() msg = msg.split(None, 1) if not len(msg): @@ -145,8 +145,8 @@ class Bot(irc.IRCClient): if priv or mod in self.module_channels[channel]: try: mod.keyword(nick, channel, kw, msg) - except Exception as e: - print e + except: + traceback.print_exc() def kickedFrom(self, channel, kicker, message): self.join(channel) -- cgit v1.2.3