Fix ordering to show correct message

This commit is contained in:
Joshua Boniface 2021-10-27 13:37:52 -04:00
parent 48b0091d3e
commit c7a5b41b1e
1 changed files with 2 additions and 2 deletions

View File

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