Permalink
Browse files

Made error output work

  • Loading branch information...
1 parent 7949ef2 commit 578d5fbb7e4e386da6c40f48d69cab5c6d9fbd1c Pasi Saarinen committed Jan 6, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 mc3p/plugins.py
View
7 mc3p/plugins.py
@@ -345,21 +345,22 @@ def __encode_msg(self, source, msg):
if 'msgtype' not in msg:
logger.error("Plugin %s tried to send message without msgtype." %\
- self.plugin.__class__.__name__)
+ self.__class__.__name__)
logger.debug(" msg: %s" % repr(msg))
return None
msgtype = msg['msgtype']
if not msg_spec[msgtype]:
logger.error(("Plugin %s tried to send message with " +\
"unrecognized type %d") %\
- (self.plugin.__class__.__name__, msgtype))
+ (self.__class__.__name__, msgtype))
logger.debug(" msg: %s" % repr(msg))
return None
try:
msgbytes = msg_spec[msgtype](msg)
except:
+ #Todo: Make this output stacktrace
logger.error("Plugin %s sent invalid message of type %d" % \
- (self.plugin__class__.__name__, msgtype))
+ (self.__class__.__name__, msgtype))
logger.debug(" msg: %s" % repr(msg))
return msgbytes

0 comments on commit 578d5fb

Please sign in to comment.