From 3128c8fa704cd9d90b0de5eb9564ddca55a40d2a Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 25 May 2021 09:59:20 -0400 Subject: [PATCH] Correct flawed conditional in some commands --- client-cli/pvc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client-cli/pvc.py b/client-cli/pvc.py index e68df9af..27a803e4 100755 --- a/client-cli/pvc.py +++ b/client-cli/pvc.py @@ -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