diff --git a/cccli/command/command.py b/cccli/command/command.py index d7120e824b42cf50fcfaf6b4923932b464aa48ab..5cc29330e150c4809bf12f2bbc95b71916d13a63 100644 --- a/cccli/command/command.py +++ b/cccli/command/command.py @@ -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: diff --git a/cccli/command/host.py b/cccli/command/host.py index f037856a636aa14cfe47ce69a6fb25af7ec86858..e533fd4ab665f15c455ad4bc4a3c3e4c1400af5e 100644 --- a/cccli/command/host.py +++ b/cccli/command/host.py @@ -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'''