From 12eef58d42e46561e5ebf464c2bd1f308c8d5186 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 27 Oct 2021 13:37:52 -0400 Subject: [PATCH] Fix ordering to show correct message --- client-cli/pvc/cli_lib/vm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client-cli/pvc/cli_lib/vm.py b/client-cli/pvc/cli_lib/vm.py index b1011f08..59cdf37b 100644 --- a/client-cli/pvc/cli_lib/vm.py +++ b/client-cli/pvc/cli_lib/vm.py @@ -865,10 +865,10 @@ def vm_networks_remove(config, vm, network, macaddr, sriov, live, restart): new_xml = tostring(parsed_xml, pretty_print=True) except Exception: return False, 'ERROR: Failed to dump XML data.' - elif not changed and network is not None: - return False, 'ERROR: Network "{}" does not exist on VM.'.format(network) elif not changed and macaddr is not None: return False, 'ERROR: Interface with MAC "{}" does not exist on VM.'.format(macaddr) + elif not changed and network is not None: + return False, 'ERROR: Network "{}" does not exist on VM.'.format(network) else: return False, 'ERROR: Unspecified error finding interface to remove.'