Fixed error in setState() method.
This commit is contained in:
parent
6041cd1952
commit
309c9e74eb
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user