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 72192A04B5; Fri, 6 Nov 2020 13:41:03 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3FC4F69A4; Fri, 6 Nov 2020 13:41:02 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 0759F697A; Fri, 6 Nov 2020 13:40:58 +0100 (CET) IronPort-SDR: GUl4shnHFE9c4iJQvV/c9WPcpo8vXW0qdLqBhnXvkZnjAHWfE2nesCGNwMMrcWbAo25O8Y8tbp X2ZNNFzmJEMw== X-IronPort-AV: E=McAfee;i="6000,8403,9796"; a="187463493" X-IronPort-AV: E=Sophos;i="5.77,456,1596524400"; d="scan'208";a="187463493" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2020 04:40:57 -0800 IronPort-SDR: 6/Etv0jIjy7EY/Ku0jauIWcG4ACTUuGHwi37wIptctr+Q6NkSzhJvVnuol/xJSoAuXiClkKFMB U58Ng3nOlK1A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,456,1596524400"; d="scan'208";a="529797830" Received: from silpixa00400355.ir.intel.com (HELO silpixa00400355.ger.corp.intel.com) ([10.237.223.148]) by fmsmga005.fm.intel.com with ESMTP; 06 Nov 2020 04:40:55 -0800 From: Ciara Power To: dev@dpdk.org Cc: stephen@networkplumber.org, bruce.richardson@intel.com, Ciara Power , andriy.berestovskyy@caviumnetworks.com, thomas@monjalon.net, stable@dpdk.org Date: Fri, 6 Nov 2020 12:40:53 +0000 Message-Id: <20201106124053.641946-1-ciara.power@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] usertools/cpu_layout: fix code to be pep8 style compliant 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" The pycodestyle tool flagged the following issues, which are now fixed. $ pycodestyle cpu_layout.py cpu_layout.py:18:5: E722 do not use bare 'except' cpu_layout.py:62:14: E231 missing whitespace after ',' Fixes: deb87e6777c0 ("usertools: use sysfs for CPU layout") Fixes: c9208f1dc967 ("usertools: fix CPU layout with python 3") Cc: andriy.berestovskyy@caviumnetworks.com Cc: thomas@monjalon.net Cc: stable@dpdk.org Signed-off-by: Ciara Power --- usertools/cpu_layout.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/usertools/cpu_layout.py b/usertools/cpu_layout.py index cc39638213..891b9238fa 100755 --- a/usertools/cpu_layout.py +++ b/usertools/cpu_layout.py @@ -15,8 +15,6 @@ fd = open("{}/cpu{}/topology/core_id".format(base_path, cpu)) except IOError: continue - except: - break core = int(fd.read()) fd.close() fd = open("{}/cpu{}/topology/physical_package_id".format(base_path, cpu)) @@ -59,7 +57,7 @@ for c in cores: output = "Core %s" % str(c).ljust(max_core_id_len) for s in sockets: - if (s,c) in core_map: + if (s, c) in core_map: output += " " + str(core_map[(s, c)]).ljust(max_core_map_len) else: output += " " * (max_core_map_len + 1) -- 2.25.1