From: Lucas Meneghel Rodrigues Subject: [PATCH] KVM test: physical_resources_check: Initialize output Date: Mon, 10 Jan 2011 13:27:45 -0200 Message-ID: <1294673265-6427-1-git-send-email-lmr@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: autotest@test.kernel.org Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org So we don't have errors when the monitor function "info" fails, leading to an undefined variable error. Signed-off-by: Lucas Meneghel Rodrigues --- client/tests/kvm/tests/physical_resources_check.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/tests/physical_resources_check.py b/client/tests/kvm/tests/physical_resources_check.py index b9542b7..54bfbd9 100644 --- a/client/tests/kvm/tests/physical_resources_check.py +++ b/client/tests/kvm/tests/physical_resources_check.py @@ -53,6 +53,7 @@ def run_physical_resources_check(test, params, env): def check_num(devices, info_cmd, check_str): f_fail = 0 expected_num = params.objects(devices).__len__() + o = "" try: o = vm.monitor.info(info_cmd) except kvm_monitor.MonitorError, e: @@ -84,6 +85,7 @@ def run_physical_resources_check(test, params, env): expected = params.object_params(chk_device).get(fmt_model) if not expected: expected = "rtl8139" + o = "" try: o = vm.monitor.info(info_cmd) except kvm_monitor.MonitorError, e: @@ -115,6 +117,7 @@ def run_physical_resources_check(test, params, env): n_fail += f_fail logging.info("Network card MAC check") + o = "" try: o = vm.monitor.info("network") except kvm_monitor.MonitorError, e: -- 1.7.3.4