From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 64C9DA3168 for ; Thu, 17 Oct 2019 09:49:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2E8BF1E881; Thu, 17 Oct 2019 09:49:44 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 72B971E54B for ; Thu, 17 Oct 2019 09:49:42 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Oct 2019 00:49:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,307,1566889200"; d="scan'208";a="396172497" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga005.fm.intel.com with ESMTP; 17 Oct 2019 00:49:39 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 17 Oct 2019 00:49:32 -0700 Received: from cdsmsx151.ccr.corp.intel.com (172.17.4.38) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 17 Oct 2019 00:49:31 -0700 Received: from cdsmsx102.ccr.corp.intel.com ([169.254.2.114]) by CDSMSX151.ccr.corp.intel.com ([169.254.3.155]) with mapi id 14.03.0439.000; Thu, 17 Oct 2019 15:48:28 +0800 From: "Zeng, XiaoxiaoX" To: "Xiao, QimaiX" , "dts@dpdk.org" , "Zeng, XiaoxiaoX" CC: "Xiao, QimaiX" Thread-Topic: [dts] [PATCH V1] framework/utils: add verify subclazz.__bases__ is not None or empty Thread-Index: AQHVhLyO73s9CI2rwUGpniwyzRfucKdedFHw Date: Thu, 17 Oct 2019 07:48:27 +0000 Message-ID: References: <1571297204-82266-1-git-send-email-qimaix.xiao@intel.com> In-Reply-To: <1571297204-82266-1-git-send-email-qimaix.xiao@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.17.6.105] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] framework/utils: add verify subclazz.__bases__ is not None or empty X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Tested-by: Zeng,xiaoxiaoX -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai Sent: Thursday, October 17, 2019 3:27 PM To: dts@dpdk.org Cc: Xiao, QimaiX Subject: [dts] [PATCH V1] framework/utils: add verify subclazz.__bases__ is= not None or empty in scapy 2.4.3, when import scapy.all import * in testsuit will cause error= , subclazz.__bases__ can't be None or empty in this if sentence Signed-off-by: Xiao Qimai --- framework/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/utils.py b/framework/utils.py index 8f5a233..516dc91= 100644 --- a/framework/utils.py +++ b/framework/utils.py @@ -195,7 +195,7 @@ def get_subclasses(module, clazz): Get module attribute name and attribute. """ for subclazz_name, subclazz in inspect.getmembers(module): - if hasattr(subclazz, '__bases__') and clazz in subclazz.__bases__: + if hasattr(subclazz, '__bases__') and subclazz.__bases__ and clazz= in subclazz.__bases__: yield (subclazz_name, subclazz) =20 =20 -- 1.8.3.1