From 30002f95d798cff49e9fa8d83d3123cbb9894b96 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Wed, 10 Apr 2019 16:18:18 -0400 Subject: [PATCH] Correct bug in non-editor modify --- client-cli/pvc.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client-cli/pvc.py b/client-cli/pvc.py index f2603f56..ab35bb72 100755 --- a/client-cli/pvc.py +++ b/client-cli/pvc.py @@ -298,12 +298,12 @@ def vm_modify(domain, config, editor, restart): zk_conn = pvc_common.startZKConnection(zk_host) - if editor == True: - dom_uuid = pvc_vm.getDomainUUID(zk_conn, domain) - if dom_uuid == None: - cleanup(False, 'ERROR: Could not find VM "{}" in the cluster!'.format(domain)) - dom_name = pvc_vm.getDomainName(zk_conn, dom_uuid) + dom_uuid = pvc_vm.getDomainUUID(zk_conn, domain) + if dom_uuid == None: + cleanup(False, 'ERROR: Could not find VM "{}" in the cluster!'.format(domain)) + dom_name = pvc_vm.getDomainName(zk_conn, dom_uuid) + if editor == True: # Grab the current config current_vm_config = zk_conn.get('/domains/{}/xml'.format(dom_uuid))[0].decode('ascii')