From c3c0b216d4df7fdf227edecd7e4f4d89c2cd99d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9munaire?= Date: Wed, 29 Aug 2012 18:08:09 +0200 Subject: [PATCH] Fix error message when treat a message --- consumer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/consumer.py b/consumer.py index 260437d..aa3e7f2 100644 --- a/consumer.py +++ b/consumer.py @@ -18,6 +18,8 @@ import queue import threading +import traceback +import sys from message import Message @@ -38,7 +40,7 @@ class Consumer(threading.Thread): msg.treat(self.context.hooks) except: print ("\033[1;31mERROR:\033[0m occurred during the " - "processing of the message: %s" % line) + "processing of the message: %s" % raw) exc_type, exc_value, exc_traceback = sys.exc_info() traceback.print_exception(exc_type, exc_value, exc_traceback)