prevent traceback

This commit is contained in:
Yann Leboulanger 2011-01-09 20:58:58 +01:00
parent e50b1aa7b6
commit 1c6214fb34

View file

@ -881,7 +881,10 @@ class GcPresenceReceivedEvent(nec.NetworkIncomingEvent, HelperEvent):
# We may ask it to real jid in gui part.
self.status_code = []
ns_muc_user_x = self.stanza.getTag('x', namespace=xmpp.NS_MUC_USER)
if ns_muc_user_x:
destroy = ns_muc_user_x.getTag('destroy')
else:
destroy = None
if ns_muc_user_x and destroy:
# Room has been destroyed. see
# http://www.xmpp.org/extensions/xep-0045.html#destroyroom