Properly answer an error instead of tracebacking on unknown command execution.

This commit is contained in:
Emmanuel Gil Peyrot 2015-07-25 17:19:13 +01:00 committed by Florent Le Coz
parent 2ce931cb7a
commit 170bd51387

View file

@ -216,6 +216,7 @@ class XEP_0050(BasePlugin):
name, handler = self.commands.get(key, ('Not found', None))
if not handler:
log.debug('Command not found: %s, %s', key, self.commands)
raise XMPPError('item-not-found')
payload = []
for stanza in iq['command']['substanzas']: