mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-24 03:00:15 +00:00
Fixed error in setState() method.
This commit is contained in:
parent
6041cd1952
commit
309c9e74eb
1 changed files with 3 additions and 2 deletions
|
@ -38,8 +38,9 @@ class ChatState(ElementBase):
|
||||||
def setState(self, state):
|
def setState(self, state):
|
||||||
if state in self.states:
|
if state in self.states:
|
||||||
self.name = state
|
self.name = state
|
||||||
self.xml.tag = state
|
self.xml.tag = '{%s}%s' % (self.namespace, state)
|
||||||
self.xml.attrib['xmlns'] = self.namespace
|
else:
|
||||||
|
raise ValueError('Invalid chat state')
|
||||||
|
|
||||||
def getState(self):
|
def getState(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
Loading…
Reference in a new issue