summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2017-10-07 00:56:48 +0200
committermathieui <mathieui@mathieui.net>2017-10-07 00:56:48 +0200
commita8680cc86b3afe84eb4b67a6948f086ed9c55d39 (patch)
tree41332e81e1c8882fee7586e366b8987a893ca5aa
parentf3a08138ce72e2458b0a0837aad547f3484fda42 (diff)
downloadpoezio-a8680cc86b3afe84eb4b67a6948f086ed9c55d39.tar.gz
poezio-a8680cc86b3afe84eb4b67a6948f086ed9c55d39.tar.bz2
poezio-a8680cc86b3afe84eb4b67a6948f086ed9c55d39.tar.xz
poezio-a8680cc86b3afe84eb4b67a6948f086ed9c55d39.zip
Fix #3334 (error when a service includes only the actor nick in a ban)
-rw-r--r--poezio/tabs/muctab.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py
index 22fd598a..6349b98e 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -1306,7 +1306,10 @@ class MucTab(ChatTab):
(NS_MUC_USER, NS_MUC_USER, NS_MUC_USER))
reason = presence.xml.find('{%s}x/{%s}item/{%s}reason' %
(NS_MUC_USER, NS_MUC_USER, NS_MUC_USER))
- by = by.attrib['jid'] if by is not None else None
+ if by:
+ by = by.get('jid') or by.get('nick') or None
+ else:
+ by = None
info_col = dump_tuple(get_theme().COLOR_INFORMATION_TEXT)
char_kick = get_theme().CHAR_KICK