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
|
|
@ -296,7 +296,7 @@ class TextCommands(object):
|
|||
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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue