summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-09-28 18:46:01 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2010-09-28 18:46:01 +0200
commit971f041b74867eae2cefd25c203e3a61e4125f44 (patch)
treeb562297f36d70b9d8a835b6501c2a5f3f4133371
parentd553d487232dc1cb23510319279985766a1046d9 (diff)
Added some proper traceback output.
-rwxr-xr-xfot.py10
1 files 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)