From nobody Tue May 14 15:09:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+114153+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+114153+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1705965683; cv=none; d=zohomail.com; s=zohoarc; b=QkgWpln/eI0mGCZGnuWkLX3TjKmpeOo5hU0WGSENhMFWDaTMnJCFcTkF1mJs1lYFCGZ21A26+wA/rQyVH6kRx2M+zA0hp0uJ58h+CY1qYa/ZzsOhzS9WuXve/FtUUKMyrusLCN6ZAXIw/6TsVX/EtLOl8dj+BQr6zGu38LySF1U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705965683; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=gWeLSRwA8JXOoe2IvFbWtBCqlcb/ADHTZ+heJK4PgdY=; b=lfW+9ynDyZQ1KjoAPRNofUjk2qNtr2M62xCzA1mtSJiXM2SfiJ4hw9dKJQlUD4apMSst2IB/uZWRWUCl2xlyhcl5ZSXpK40618lKFS+09Qj0cix6r0kROLeuM6dv24RtLFQP0S4UhaFOhQcTxJeOc83eKIbTAOtDV0BTNUyXH+4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+114153+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1705965683901871.0746037526417; Mon, 22 Jan 2024 15:21:23 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=3Q4gV9j+ahaQBHJr803Du6yySUC0ccEGBuInejLdtWU=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1705965683; v=1; b=Y+oOxUXsPihFAzgBAsODr80qNxIVkoqi4n0PBhmMfPPie/80g0CTfEgjR4YAfgV3xpsQ/Wdr IoztGowgo4FZP22USXNopSWFqr2h5d+aRgBE7O0v5K3ZHRBKxcWh7s07WiZ47ttwaoqgOyA3qwh 5CfLUgUQKR01D/17vWomhMNA= X-Received: by 127.0.0.2 with SMTP id ZvNwYY1788612xkSXkRQkDnI; Mon, 22 Jan 2024 15:21:23 -0800 X-Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) by mx.groups.io with SMTP id smtpd.web11.8423.1705965682935830743 for ; Mon, 22 Jan 2024 15:21:23 -0800 X-Received: by mail-oi1-f179.google.com with SMTP id 5614622812f47-3bdb42da0e0so1356964b6e.0 for ; Mon, 22 Jan 2024 15:21:22 -0800 (PST) X-Gm-Message-State: 93zKOcnfBNx51ucSZ4mOHviYx1787277AA= X-Google-Smtp-Source: AGHT+IEcFiRztOHOjZ2AKxUR70dFaKMk0vchwyHcGYFvsW7jWMBQtVD8CwEWhqU9+VkLKg2Am49Erw== X-Received: by 2002:a05:6871:58a8:b0:214:2b80:b67b with SMTP id ok40-20020a05687158a800b002142b80b67bmr704165oac.40.1705965681666; Mon, 22 Jan 2024 15:21:21 -0800 (PST) X-Received: from localhost.localdomain ([4.155.48.121]) by smtp.gmail.com with ESMTPSA id j38-20020a635526000000b005cf7c4bb938sm8884516pgb.94.2024.01.22.15.21.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 15:21:21 -0800 (PST) From: "Joey Vagedes via groups.io" To: devel@edk2.groups.io Cc: Liming Gao , Michael D Kinney , Sean Brogan Subject: [edk2-devel] [PATCH v1 1/1] .pytool/Plugin: UncrustifyCheck: use stat instead of os.stat Date: Mon, 22 Jan 2024 15:21:08 -0800 Message-Id: <20240122232108.134-2-joey.vagedes@gmail.com> In-Reply-To: <20240122232108.134-1-joey.vagedes@gmail.com> References: <20240122232108.134-1-joey.vagedes@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,joeyvagedes@microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1705965684343100004 Content-Type: text/plain; charset="utf-8" The UncrustifyCheck plugin passes os.stat.S_IWRITE to os.chmod, when attempting to change file permissions. os.stat.S_IWRITE does not exist as os.stat is a function. The correct value is stat.S_IWRITE. Signed-off-by: Joey Vagedes Cc: Liming Gao Cc: Michael D Kinney Cc: Sean Brogan Reviewed-by: Michael D Kinney --- .pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py b/.pytool/Pl= ugin/UncrustifyCheck/UncrustifyCheck.py index 9aeef5a5a3..73dc03c0dc 100644 --- a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py +++ b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py @@ -12,6 +12,7 @@ import logging import os import pathlib import shutil +import stat import timeit from edk2toolext.environment import version_aggregator from edk2toolext.environment.plugin_manager import PluginManager @@ -628,7 +629,7 @@ class UncrustifyCheck(ICiBuildPlugin): """ Private function to attempt to change permissions on file/fold= er being deleted. """ - os.chmod(path, os.stat.S_IWRITE) + os.chmod(path, stat.S_IWRITE) func(path) =20 for _ in range(3): # retry up to 3 times --=20 2.40.1.vfs.0.0 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114153): https://edk2.groups.io/g/devel/message/114153 Mute This Topic: https://groups.io/mt/103898982/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-