--- pyxmpp/jabber/muccore.py 2006-08-26 22:10:05.000000000 +0200 +++ pyxmpp/jabber/muccore.py 2010-06-11 12:02:07.000000000 +0200 @@ -404,7 +404,8 @@ if self.reason: n.newTextChild(None,"reason",to_utf8(self.reason)) n.setProp("affiliation",to_utf8(self.affiliation)) - n.setProp("role",to_utf8(self.role)) + if self.role: + n.setProp("role",to_utf8(self.role)) if self.jid: n.setProp("jid",to_utf8(self.jid.as_unicode())) if self.nick: