Skip to content

Commit e3bf616

Browse files
authored
Merge pull request #812 from gbregman/devel
Fix output redirection for get_subsystems CLI output
2 parents a7b0b7f + 3314c23 commit e3bf616

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

control/cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1824,14 +1824,16 @@ def namespace(self, args):
18241824
@cli.cmd()
18251825
def get_subsystems(self, args):
18261826
"""Get subsystems"""
1827+
out_func, err_func = self.get_output_functions(args)
1828+
18271829
subsystems = self.stub.get_subsystems(pb2.get_subsystems_req())
18281830
if args.format == "python":
18291831
return subsystems
18301832
subsystems_out = json_format.MessageToJson(
18311833
subsystems,
18321834
indent=4, including_default_value_fields=True,
18331835
preserving_proto_field_name=True)
1834-
self.logger.info(f"Get subsystems:\n{subsystems_out}")
1836+
out_func(f"Get subsystems:\n{subsystems_out}")
18351837

18361838
def main_common(client, args):
18371839
client.logger.setLevel(GatewayEnumUtils.get_value_from_key(pb2.GwLogLevel, args.log_level.lower()))

0 commit comments

Comments
 (0)