Put list handling in the right place

This commit is contained in:
Joshua Boniface 2020-01-05 11:51:03 -05:00
parent 44753c0609
commit 46f3915ab4
1 changed files with 4 additions and 4 deletions

View File

@ -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