Fixed error in setState() method.

This commit is contained in:
Lance Stout 2010-06-27 16:34:48 -04:00
parent 6041cd1952
commit 309c9e74eb

View file

@ -38,8 +38,9 @@ class ChatState(ElementBase):
def setState(self, state):
if state in self.states:
self.name = state
self.xml.tag = state
self.xml.attrib['xmlns'] = self.namespace
self.xml.tag = '{%s}%s' % (self.namespace, state)
else:
raise ValueError('Invalid chat state')
def getState(self):
return self.name