Commit e9ee8a5f authored by Wolfgang Rohdewald's avatar Wolfgang Rohdewald
Browse files

Message initialization: make it clearer

parent 0b046bb0
......@@ -49,7 +49,6 @@ class Message(object):
self.shortcut = shortcut
# do not use a numerical value because that could easier
# change with software updates
Message.defined[self.name] = self
className = self.__class__.__name__.replace('Message', '')
msgName = self.name.replace(' ', '')
assert className == msgName, '%s != %s' % (className, msgName)
......@@ -848,6 +847,7 @@ def __scanSelf():
raise
type.__setattr__(
Message, msg.name.replace(' ', ''), msg)
Message.defined[msg.name] = msg
class ChatMessage(object):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment