Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/logbot.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2012-10-09 17:39:50 -0400
committerJason R. Coombs <jaraco@jaraco.com>2012-10-09 17:39:50 -0400
commit438a0785fb47fc1ba9fe9421ed47cc9defb15922 (patch)
tree0043ec375a5329586ee47a102835a3f890eaa38e /logbot.py
parent69bdad2ec5e373f1834fe725997fe169b09ae2d2 (diff)
Fix IndexError due to unintentionally moving call out of try block
Diffstat (limited to 'logbot.py')
-rwxr-xr-xlogbot.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/logbot.py b/logbot.py
index 80047c7..b7cc694 100755
--- a/logbot.py
+++ b/logbot.py
@@ -246,8 +246,9 @@ class Logbot(SingleServerIRCBot):
try: msg = msg.replace("%channel%", event.target())
except: pass
msg = msg.replace("%color%", self.color(nm_to_n(event.source())))
- user_message = cgi.escape(event.arguments()[0])
- try: msg = msg.replace("%message%", html_color(user_message))
+ try:
+ user_message = cgi.escape(event.arguments()[0])
+ msg = msg.replace("%message%", html_color(user_message))
except: pass
return msg