From patchwork Thu Nov 5 10:01:08 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 57863 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 nA5A3meQ016988 for ; Thu, 5 Nov 2009 10:03:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753035AbZKEKDk (ORCPT ); Thu, 5 Nov 2009 05:03:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751252AbZKEKDk (ORCPT ); Thu, 5 Nov 2009 05:03:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:64210 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751165AbZKEKDi (ORCPT ); Thu, 5 Nov 2009 05:03:38 -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 nA5A3h1o003269; Thu, 5 Nov 2009 05:03:43 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nA5A3htj017998; Thu, 5 Nov 2009 05:03:43 -0500 Received: from localhost.localdomain (dhcp-1-188.tlv.redhat.com [10.35.1.188]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id nA5A3aFf017064; Thu, 5 Nov 2009 05:03:42 -0500 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH 3/7] KVM test: kvm_vm.py: use 'is None' instead of '== None' Date: Thu, 5 Nov 2009 12:01:08 +0200 Message-Id: <1257415272-9423-3-git-send-email-mgoldish@redhat.com> In-Reply-To: <1257415272-9423-2-git-send-email-mgoldish@redhat.com> References: <1257415272-9423-1-git-send-email-mgoldish@redhat.com> <1257415272-9423-2-git-send-email-mgoldish@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/kvm_vm.py b/client/tests/kvm/kvm_vm.py index e1f5cad..ccf8fa9 100755 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -143,13 +143,13 @@ class VM: @param root_dir: Optional new base directory for relative filenames @param address_cache: A dict that maps MAC addresses to IP addresses """ - if name == None: + if name is None: name = self.name - if params == None: + if params is None: params = self.params.copy() - if root_dir == None: + if root_dir is None: root_dir = self.root_dir - if address_cache == None: + if address_cache is None: address_cache = self.address_cache return VM(name, params, root_dir, address_cache) @@ -190,11 +190,11 @@ class VM: nic_model -- string to pass as 'model' parameter for this NIC (e.g. e1000) """ - if name == None: + if name is None: name = self.name - if params == None: + if params is None: params = self.params - if root_dir == None: + if root_dir is None: root_dir = self.root_dir # Start constructing the qemu command @@ -320,11 +320,11 @@ class VM: """ self.destroy() - if name != None: + if name is not None: self.name = name - if params != None: + if params is not None: self.params = params - if root_dir != None: + if root_dir is not None: self.root_dir = root_dir name = self.name params = self.params