diff options
author | Lance Stout <lancestout@gmail.com> | 2010-06-27 16:34:48 -0400 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2010-06-27 16:34:48 -0400 |
commit | 309c9e74eb906af42841d2ab783aa18843c08878 (patch) | |
tree | 683cff40e6a2b755f08e50bbf8d05910dafa8d17 /sleekxmpp | |
parent | 6041cd1952cbe3a54354eaa6395d49986632e871 (diff) | |
download | slixmpp-309c9e74eb906af42841d2ab783aa18843c08878.tar.gz slixmpp-309c9e74eb906af42841d2ab783aa18843c08878.tar.bz2 slixmpp-309c9e74eb906af42841d2ab783aa18843c08878.tar.xz slixmpp-309c9e74eb906af42841d2ab783aa18843c08878.zip |
Fixed error in setState() method.
Diffstat (limited to 'sleekxmpp')
-rw-r--r-- | sleekxmpp/plugins/xep_0085.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sleekxmpp/plugins/xep_0085.py b/sleekxmpp/plugins/xep_0085.py index e183ec27..e24e9db0 100644 --- a/sleekxmpp/plugins/xep_0085.py +++ b/sleekxmpp/plugins/xep_0085.py @@ -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 |