Commit db47dbbc authored by mathieui's avatar mathieui
Browse files

Fix a traceback on adhoc

parent ce915a86
...@@ -1224,7 +1224,7 @@ class HandlerCore: ...@@ -1224,7 +1224,7 @@ class HandlerCore:
### Ad-hoc commands ### Ad-hoc commands
def on_next_adhoc_step(self, iq, adhoc_session): def next_adhoc_step(self, iq, adhoc_session):
status = iq['command']['status'] status = iq['command']['status']
xform = iq.xml.find('{http://jabber.org/protocol/commands}command/{jabber:x:data}x') xform = iq.xml.find('{http://jabber.org/protocol/commands}command/{jabber:x:data}x')
if xform is not None: if xform is not None:
...@@ -1257,7 +1257,7 @@ class HandlerCore: ...@@ -1257,7 +1257,7 @@ class HandlerCore:
notes = '\n'.join([note[1] for note in iq['command']['notes']]) notes = '\n'.join([note[1] for note in iq['command']['notes']])
self.core.information("Adhoc command %s: %s" % (status, notes), "Info") self.core.information("Adhoc command %s: %s" % (status, notes), "Info")
def on_adhoc_error(self, iq, adhoc_session): def adhoc_error(self, iq, adhoc_session):
self.core.xmpp.plugin['xep_0050'].terminate_command(adhoc_session) self.core.xmpp.plugin['xep_0050'].terminate_command(adhoc_session)
error_message = self.core.get_error_message(iq) error_message = self.core.get_error_message(iq)
self.core.information("An error occured while executing the command: %s" % (error_message), self.core.information("An error occured while executing the command: %s" % (error_message),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment