From ad45f6097f3da95c03853e0fbcbb69c1c0f8b6e7 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sat, 11 Jul 2020 11:38:13 -0400 Subject: [PATCH] Don't output anything if no results and --raw --- client-cli/pvc.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client-cli/pvc.py b/client-cli/pvc.py index 77e1bbdf..8f4feba1 100755 --- a/client-cli/pvc.py +++ b/client-cli/pvc.py @@ -550,6 +550,9 @@ def node_list(limit, target_daemon_state, target_coordinator_state, target_domai retcode, retdata = pvc_node.node_list(config, limit, target_daemon_state, target_coordinator_state, target_domain_state) if retcode: retdata = pvc_node.format_list(retdata, raw) + else: + if raw: + retdata = "" cleanup(retcode, retdata) ############################################################################### @@ -1076,6 +1079,9 @@ def vm_list(target_node, target_state, limit, raw): retcode, retdata = pvc_vm.vm_list(config, limit, target_node, target_state) if retcode: retdata = pvc_vm.format_list(config, retdata, raw) + else: + if raw: + retdata = "" cleanup(retcode, retdata) ###############################################################################