From patchwork Sun Nov 15 20:39:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 60125 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAFKe5f0016155 for ; Sun, 15 Nov 2009 20:40:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753696AbZKOUjw (ORCPT ); Sun, 15 Nov 2009 15:39:52 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753697AbZKOUjw (ORCPT ); Sun, 15 Nov 2009 15:39:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:64324 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753695AbZKOUjw (ORCPT ); Sun, 15 Nov 2009 15:39:52 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAFKdvg4010576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 15 Nov 2009 15:39:57 -0500 Received: from localhost.localdomain (vpn-11-32.rdu.redhat.com [10.11.11.32]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nAFKdtH2021383; Sun, 15 Nov 2009 15:39:55 -0500 From: Lucas Meneghel Rodrigues To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues Subject: [PATCH] KVM test: migration subtest: Handle case where session2 does not exist Date: Sun, 15 Nov 2009 18:39:54 -0200 Message-Id: <1258317594-3858-1-git-send-email-lmr@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/client/tests/kvm/tests/migration.py b/client/tests/kvm/tests/migration.py index 7b80e51..21df1e2 100644 --- a/client/tests/kvm/tests/migration.py +++ b/client/tests/kvm/tests/migration.py @@ -74,9 +74,10 @@ def run_migration(test, params, env): finally: # Kill the background process - if session2.is_alive(): - session2.get_command_output(params.get("migration_bg_kill_command", - "")) + if session2: + if session2.is_alive(): + session2.get_command_output( + params.get("migration_bg_kill_command", "")) session2.close() session.close()