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:
parent
3b84fc1765
commit
a6a967b2f0
1 changed files with 6 additions and 6 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue