Skip to content
Snippets Groups Projects
Commit ca5fca29 authored by Seblu's avatar Seblu
Browse files

command exec use new callback args

parent 7a933c03
No related branches found
No related tags found
No related merge requests found
......@@ -194,7 +194,7 @@ class TqlCommand(OptionCommand):
l[_options["tql_index"]] = "id=%s"%obj["id"]
d = self.cli.rpc.call(*tuple(l), **kwargs)
if _options["callback"] is not None:
_options["callback"](obj["output"])
_options["callback"](obj)
if _options["status"]:
self.print_objects(d, ("output"))
except RpcError as e:
......
......@@ -26,9 +26,8 @@ class Command_exec(TqlCommand):
def _cb_print_output(self, d):
'''Print output of execute by object'''
for o in d:
self.printer.out("%s output:"%o[0])
self.printer.out("".join(o[1][0][0:]), nl="")
self.printer.out("%s output:"%d["id"])
self.printer.out(d.get("output", ""), nl="")
class Command_shutdown(TqlCommand):
'''Shutdown a physical host'''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment