From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 00DEE941E66 for ; Mon, 22 Jan 2024 23:21:24 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=8OUNfZBEZuONGkGnR3uLTs4UXt0mBP5JEFZ4xcDQwj8=; 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=CA6i0QeIG4fIUTK94MbUyAG1UAs432wRBVe1FO2pThlSpKRi9tb8LHnLfwRphxpsmt1xsSoY WNp4ox2a9EpyvJkAmAH0dEOfzu1WYe1VbmyrEzTrXNZiyfu5CRZk7i72BPwqebPo0DBAWgTBksd JCu4FpXfpqiXEC8doOErNfcM= X-Received: by 127.0.0.2 with SMTP id wRj9YY7687511xDe3QkCDgl0; 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: lRxNpBX86G6Xtr5rWkvUmJZsx7686176AA= 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-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=CA6i0QeI; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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 --- .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=0D import pathlib=0D import shutil=0D +import stat=0D import timeit=0D from edk2toolext.environment import version_aggregator=0D from edk2toolext.environment.plugin_manager import PluginManager=0D @@ -628,7 +629,7 @@ class UncrustifyCheck(ICiBuildPlugin): """=0D Private function to attempt to change permissions on file/fold= er being deleted.=0D """=0D - os.chmod(path, os.stat.S_IWRITE)=0D + os.chmod(path, stat.S_IWRITE)=0D func(path)=0D =0D for _ in range(3): # retry up to 3 times=0D --=20 2.40.1.vfs.0.0 -=-=-=-=-=-=-=-=-=-=-=- 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/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-