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 495C1A328D for ; Tue, 22 Oct 2019 11:26:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1773F1BE9C; Tue, 22 Oct 2019 11:26:18 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id AD47F1BE9B for ; Tue, 22 Oct 2019 11:26:15 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2019 02:26:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,326,1566889200"; d="scan'208";a="209634035" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga001.fm.intel.com with ESMTP; 22 Oct 2019 02:26:14 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 22 Oct 2019 02:26:14 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 22 Oct 2019 02:26:14 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.96]) by SHSMSX153.ccr.corp.intel.com ([10.239.6.53]) with mapi id 14.03.0439.000; Tue, 22 Oct 2019 17:26:12 +0800 From: "Tu, Lijuan" To: "Xiao, QimaiX" , "dts@dpdk.org" CC: "Xiao, QimaiX" Thread-Topic: [dts] [PATCH V1] framework/utils: add verify subclazz.__bases__ is not None or empty Thread-Index: AQHVhLyN+FcYe3oaiEiMhnhl7M3/A6dma/mA Date: Tue, 22 Oct 2019 09:26:12 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB4505C@SHSMSX101.ccr.corp.intel.com> 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: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzU3MzFiZTYtODI3YS00NGYwLWIwNTItMTA0MWE5YzQyNjQzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWWdFWHJhc0VWSG9YNGNjS2tmb1pZdWhvTlFublBrZ3ZveXhOVXdIVERWTjRSMTdzbzNRa2F1MW42WXFHRjlLayJ9 x-originating-ip: [10.239.127.40] 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" Applied, thanks > -----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 >=20 > in scapy 2.4.3, when import scapy.all import * in testsuit will cause err= or, > subclazz.__bases__ can't be None or empty in this if sentence >=20 > Signed-off-by: Xiao Qimai > --- > framework/utils.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/framework/utils.py b/framework/utils.py index 8f5a233..516dc= 91 > 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 cla= zz in > subclazz.__bases__: > yield (subclazz_name, subclazz) >=20 >=20 > -- > 1.8.3.1