Correct flawed conditional in some commands

This commit is contained in:
Joshua Boniface 2021-05-25 09:59:20 -04:00
parent 0c75a127b2
commit 3128c8fa70
1 changed files with 2 additions and 2 deletions

View File

@ -728,7 +728,7 @@ def vm_modify(domain, cfgfile, editor, restart, confirm_flag):
cleanup(False, 'Either an XML config file or the "--editor" option must be specified.')
retcode, vm_information = pvc_vm.vm_info(config, domain)
if not retcode and not vm_information.get('name', None):
if not retcode or not vm_information.get('name', None):
cleanup(False, 'ERROR: Could not find VM "{}"!'.format(domain))
dom_name = vm_information.get('name')
@ -1586,7 +1586,7 @@ def vm_dump(domain):
"""
retcode, vm_information = pvc_vm.vm_info(config, domain)
if not retcode and not vm_information.get('name', None):
if not retcode or not vm_information.get('name', None):
cleanup(False, 'ERROR: Could not find VM "{}"!'.format(domain))
# Grab the current config