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

@ -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