diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-09-28 18:46:01 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-09-28 18:46:01 +0200 |
commit | 971f041b74867eae2cefd25c203e3a61e4125f44 (patch) | |
tree | b562297f36d70b9d8a835b6501c2a5f3f4133371 | |
parent | d553d487232dc1cb23510319279985766a1046d9 (diff) |
Added some proper traceback output.
-rwxr-xr-x | fot.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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) |