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 6CEE6A059B; Fri, 10 Apr 2020 11:54:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9E3251D440; Fri, 10 Apr 2020 11:54:39 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 0042A1D421 for ; Fri, 10 Apr 2020 11:54:37 +0200 (CEST) IronPort-SDR: an3QlhP4xmI8bRC8fS4ywkGeK7Wq+zhHvY/HvAtwpPZsIYg9uxbOTee7HJDbXYQhTG6snhyYry agiQXy/hJpbQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2020 02:54:36 -0700 IronPort-SDR: LpPAAL3g3Bvunuv9Y6TXauUDYOjEQu/gHDs1sB0HV+6426tC4fG5HU3j7jAXuHIf8extbfvaqO OjHCRH8mZwYA== X-IronPort-AV: E=Sophos;i="5.72,366,1580803200"; d="scan'208";a="425842329" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.50.46]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 10 Apr 2020 02:54:34 -0700 Date: Fri, 10 Apr 2020 10:54:30 +0100 From: Bruce Richardson To: "Pattan, Reshma" Cc: "Power, Ciara" , "dev@dpdk.org" , "Laatz, Kevin" , "jerinjacobk@gmail.com" , "david.marchand@redhat.com" , "Wiles, Keith" , "mb@smartsharesystems.com" , "thomas@monjalon.net" Message-ID: <20200410095430.GD625@bricha3-MOBL.ger.corp.intel.com> References: <20200319171907.60891-1-ciara.power@intel.com> <20200408164956.47864-1-ciara.power@intel.com> <20200408164956.47864-10-ciara.power@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [dpdk-dev] [PATCH v2 09/16] usertools: add new telemetry python script X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Apr 10, 2020 at 10:43:18AM +0100, Pattan, Reshma wrote: > > > > -----Original Message----- > > From: Power, Ciara > > Some pylint checks found, good to address valid ones. > > #pylint-3.6 ./usertools/dpdk-telemetry.py or # pylint ./usertools/dpdk-telemetry.py > ************* Module dpdk-telemetry > W: 18, 0: Bad indentation. Found 12 spaces, expected 8 (bad-indentation) > W: 19, 0: Bad indentation. Found 12 spaces, expected 8 (bad-indentation) > C: 30, 0: Unnecessary parens after 'while' keyword (superfluous-parens) > W: 41, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) > W: 44, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation) > C: 1, 0: Invalid module name "dpdk-telemetry" (invalid-name) > C: 1, 0: Missing module docstring (missing-docstring) > C: 10, 0: Invalid constant name "telemetry_version" (invalid-name) > C: 12, 0: Missing function docstring (missing-docstring) > C: 21, 0: Missing function docstring (missing-docstring) > C: 38, 0: Invalid constant name "fd" (invalid-name) > > >+def read_socket(buf_len): > >+ return json.loads(reply) > > Close the open fd? > > >+ except: > >+ print("Error in reply: ", reply) > > Close the open fd? > > >+ raise > > > +def handle_socket(path): > > > + fd.connect(path) > > + except OSError: > > Good to add reason of error message. > Do you need to close the fd? > > > + return > Thanks for the review, Reshma. For v3 we are ensuring pep8/pycodestyle compliance, but we'll also add pylint to the list to run. We'll look into the other issues too.