From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.85.221.42; helo=mail-wr1-f42.google.com; envelope-from=philmd@redhat.com; receiver=edk2-devel@lists.01.org Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 16861211CFFE0 for ; Thu, 28 Feb 2019 05:49:32 -0800 (PST) Received: by mail-wr1-f42.google.com with SMTP id o17so22057203wrw.3 for ; Thu, 28 Feb 2019 05:49:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Imhr4k3z/Muriu45TT8f2TahbprgoQzSqYdf+8p627U=; b=BOcUvb+Lg265bcbWwEU39HisAXGIKuMkyeKOPLC0DsJmdxEYjgpZ9WHxGx3aBA/5gQ xAUvJyrEF0VuKC4CC7V3cNlu/0r8cm6kTuaB6sn6x3iMnXWvx563UUH2b9vfQPXg30Hf YK8IhgVO2FejMLRa/wfye+wDq0NVsSabIV1yYkI/0jIDm7umINP0Av7eqrxutKwkRle1 VpWZKTBOKeXEB7WHlap81BKHmihVmI/x68Lzwg6xUUFpVY1CvyqwUi5Cft148t2KZqRM kdpvXRRqetxwq4CA0QJWMxgssFvvBypOd+q74OWgUSaIwiZQPZ1NTlIxbySfJburMNiH 4vNQ== X-Gm-Message-State: APjAAAVUMdkNPikdfJa/8/0fYuUfDBSykvpzgD5j3vdNtWn+dnzqLtho 0TzxQmZ39ncpJsoZtHHGgjZcL/YU/m9iGA== X-Google-Smtp-Source: APXvYqyjRnXQ+zz3OqwB6xJ4CEDT8qYxA5AfgLVPwdgidoLw25Yb9cZ7HUg9SOf9nwb0UfqY9qAcEQ== X-Received: by 2002:adf:ed11:: with SMTP id a17mr6436709wro.283.1551361770690; Thu, 28 Feb 2019 05:49:30 -0800 (PST) Received: from [192.168.1.37] (43.red-88-25-181.staticip.rima-tde.net. [88.25.181.43]) by smtp.gmail.com with ESMTPSA id d206sm8214333wmc.11.2019.02.28.05.49.29 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 28 Feb 2019 05:49:30 -0800 (PST) To: "Feng, Bob C" Cc: "Gao, Liming" , "edk2-devel@lists.01.org" References: <20190228131909.2612-1-bob.c.feng@intel.com> <08650203BA1BD64D8AD9B6D5D74A85D1600A0DEE@SHSMSX101.ccr.corp.intel.com> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <7adf5d4d-3731-defc-ff66-d9837934f331@redhat.com> Date: Thu, 28 Feb 2019 14:49:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <08650203BA1BD64D8AD9B6D5D74A85D1600A0DEE@SHSMSX101.ccr.corp.intel.com> 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:49:33 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 2/28/19 2:29 PM, Feng, Bob C wrote: > 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 > > -----Original Message----- > From: Feng, Bob C > 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 checking > > https://bugzilla.tianocore.org/show_bug.cgi?id=1509 > > 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 index 0dd65632d0..356c1d600c 100644 > --- a/BaseTools/Tests/RunTests.py > +++ b/BaseTools/Tests/RunTests.py > @@ -17,10 +17,17 @@ > # > import os > import sys > import unittest > > +try: > + import distutils.util > +except ModuleNotFoundError: > + sys.exit(''' > +Python reported: "No module named 'distutils.uitl'" Again: 'uitl' -> 'util' Can the maintainer fix that typo before applying? Although I find the current error message a bit opaque for the user. To be clearer and tell the user this is not a problem within EDK2 but in his setup, I suggest a more explicit "Required module 'distutils.util' not found". Regardless, with the 'uitl' typo fixed: Reviewed-by: Philippe Mathieu-Daude Thanks, Phil. > +''') > + > import TestTools > > def GetCTestSuite(): > import CToolsTests > return CToolsTests.TheTestSuite() > -- > 2.20.1.windows.1 >