diff src/plugins/plugin_misc_text_commands.py @ 1742:244a605623d6

complete the Exception's list when catching JID error: - Twisted JID constructor raises not only jid.InvalidFormat but also RuntimeError and AttributeError
author souliane <souliane@mailoo.org>
date Tue, 15 Dec 2015 13:30:47 +0100
parents 3265a2639182
children d17772b0fe22
line wrap: on
line diff
--- a/src/plugins/plugin_misc_text_commands.py	Fri Dec 11 09:12:11 2015 +0100
+++ b/src/plugins/plugin_misc_text_commands.py	Tue Dec 15 13:30:47 2015 +0100
@@ -296,7 +296,7 @@
                 target_jid = jid.JID(entity)
                 if not target_jid.user or not target_jid.host:
                     raise jid.InvalidFormat
-            except (jid.InvalidFormat, RuntimeError):
+            except (RuntimeError, jid.InvalidFormat, AttributeError):
                 self.feedBack(_("Invalid jid, can't whois"), mess_data, profile)
                 return False