From 46f3915ab4e0d72ca3448dbd7a1064b92739dfca Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 5 Jan 2020 11:51:03 -0500 Subject: [PATCH] Put list handling in the right place --- client-cli/cli_lib/vm.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client-cli/cli_lib/vm.py b/client-cli/cli_lib/vm.py index e4b46b57..d884aadc 100644 --- a/client-cli/cli_lib/vm.py +++ b/client-cli/cli_lib/vm.py @@ -448,10 +448,6 @@ def follow_console_log(config, vm, lines=10): # Output display functions # def format_info(config, domain_information, long_output): - # Handle single-element lists - if not isinstance(domain_information, list): - domain_information = [ domain_information ] - # Format a nice output; do this line-by-line then concat the elements at the end ainformation = [] ainformation.append('{}Virtual machine information:{}'.format(ansiprint.bold(), ansiprint.end())) @@ -566,6 +562,10 @@ def format_info(config, domain_information, long_output): click.echo('') def format_list(config, vm_list, raw): + # Handle single-element lists + if not isinstance(vm_list, list): + vm_list = [ vm_list ] + # Function to strip the "br" off of nets and return a nicer list def getNiceNetID(domain_information): # Network list