complete the Exception's list when catching JID error:

- Twisted JID constructor raises not only jid.InvalidFormat but also RuntimeError and AttributeError
This commit is contained in:
souliane 2015-12-15 13:30:47 +01:00
commit a6a967b2f0

View file

@ -139,7 +139,7 @@ class Exp_Parrot(object):
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