diff src/plugins/plugin_exp_parrot.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_exp_parrot.py	Fri Dec 11 09:12:11 2015 +0100
+++ b/src/plugins/plugin_exp_parrot.py	Tue Dec 15 13:30:47 2015 +0100
@@ -139,7 +139,7 @@
             link_left_jid = jid.JID(mess_data["unparsed"].strip())
             if not link_left_jid.user or not link_left_jid.host:
                 raise jid.InvalidFormat
-        except jid.InvalidFormat:
+        except (RuntimeError, jid.InvalidFormat, AttributeError):
             txt_cmd.feedBack("Can't activate Parrot mode for invalid jid", mess_data, profile)
             return False