diff src/plugins/plugin_exp_command_export.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 22a8e770cb7b
children d17772b0fe22
line wrap: on
line diff
--- a/src/plugins/plugin_exp_command_export.py	Fri Dec 11 09:12:11 2015 +0100
+++ b/src/plugins/plugin_exp_command_export.py	Tue Dec 15 13:30:47 2015 +0100
@@ -151,7 +151,7 @@
                 if not _jid.user or not _jid.host:
                     raise jid.InvalidFormat
                 _jid = _jid.userhostJID()
-            except (jid.InvalidFormat, RuntimeError):
+            except (RuntimeError, jid.InvalidFormat, AttributeError):
                 log.info(u"invalid target ignored: %s" % (target,))
                 continue
             process_prot = ExportCommandProtocol(self, _jid, options, profile)