From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 52418211CFFDA for ; Thu, 28 Feb 2019 05:29:26 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Feb 2019 05:29:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,423,1544515200"; d="scan'208";a="125886900" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga007.fm.intel.com with ESMTP; 28 Feb 2019 05:29:26 -0800 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 28 Feb 2019 05:29:26 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 28 Feb 2019 05:29:25 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.158]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.80]) with mapi id 14.03.0415.000; Thu, 28 Feb 2019 21:29:23 +0800 From: "Feng, Bob C" To: =?iso-8859-1?Q?Philippe_Mathieu-Daud=E9?= CC: "Gao, Liming" , "edk2-devel@lists.01.org" Thread-Topic: [Patch V3] BaseTools: Add python3-distutils Ubuntu package checking Thread-Index: AQHUz2g6qnHbign0sUahm3xmATm2xKX1Myhw Date: Thu, 28 Feb 2019 13:29:23 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D1600A0DEE@SHSMSX101.ccr.corp.intel.com> References: <20190228131909.2612-1-bob.c.feng@intel.com> In-Reply-To: <20190228131909.2612-1-bob.c.feng@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDlmMWMwM2EtZGRmYS00ZWIxLWIzOTMtZjY5Y2E0NjBmOWJlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoia1lLVVBiNkw3ek04dXVvZ1wvSzErNzh1RVc3a0s4MThYcmJiWUIwa25xcmthbXZicjY5eGtYYnhaQk9zVEpHRHgifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch V3] BaseTools: Add python3-distutils Ubuntu package checking X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2019 13:29:27 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Phil, Your suggested code is good but it still print the call stack. I changed it= a little, it only print the error message now. Thanks, Bob=20 -----Original Message----- From: Feng, Bob C=20 Sent: Thursday, February 28, 2019 9:19 PM To: edk2-devel@lists.01.org Cc: Feng, Bob C ; Gao, Liming Subject: [Patch V3] BaseTools: Add python3-distutils Ubuntu package checkin= g https://bugzilla.tianocore.org/show_bug.cgi?id=3D1509 Add python3-distutils Ubuntu package checking. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao --- BaseTools/Tests/RunTests.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BaseTools/Tests/RunTests.py b/BaseTools/Tests/RunTests.py inde= x 0dd65632d0..356c1d600c 100644 --- a/BaseTools/Tests/RunTests.py +++ b/BaseTools/Tests/RunTests.py @@ -17,10 +17,17 @@ # import os import sys import unittest =20 +try: + import distutils.util +except ModuleNotFoundError: + sys.exit(''' +Python reported: "No module named 'distutils.uitl'" +''') + import TestTools =20 def GetCTestSuite(): import CToolsTests return CToolsTests.TheTestSuite() -- 2.20.1.windows.1