From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B58ACA0510 for ; Fri, 15 Apr 2022 12:16:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD0B340687; Fri, 15 Apr 2022 12:16:41 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2044.outbound.protection.outlook.com [40.107.243.44]) by mails.dpdk.org (Postfix) with ESMTP id 72CBF4067C for ; Fri, 15 Apr 2022 12:16:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=my5scaLBjebQaZqD84Muz52KZaDCQMy2B+7AsWatWwUA6/eIsr0I0M4+gkzQX2KRsTXHrpA9zDGtOCGlgSOjweCI7NnJTEiK/6g/BpY0K5WA/EemYPWeksgKzgFJl/cByEOZ5mKZiEH/U5CIYyrwfGBNxMZWekZVdph6gey8gaLFEAFZiscQa4MMWET1SlgbPMXeCltO65jtvQum66RaZtocsgp/eWJcyVFqZTI24njkPlpHtQUXjN5JY1I78vvtneB31laKiiuuGqMxRafwXnQ+T41QKZk9p1OeeX5F1wWbyfDQtSmkMMTE4rKlLszuxITkcFYZlHi2sjCHd7XwFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OiwXh07oKGYmZqFGd2DZuscOxNE/VqtzziLqwJb9GlI=; b=nBhZQyeuh7sOAL+NgIr26yM1xs7tKDgeSCdDbYI0XAnaecROkpG5SZ5F7vcVb+9MS6CMCqwHBbjRn8n1B8OvXBjJyTwVlMo/8oyDTBVY0khQmOP71OUG3pkAHRPMqIaBtdPnvCuTZAPkVWs6Zgm4fovOhb787p+TTgqWigDzIdPV8jNBqEAuBX7dszaZFeTLmA0iCR5ztWUmWcvEOXR0QoBqakFu+p6wngXpGu+ohdXeSylSOyYRdqR8QW51S7BcV4AxDEvtUpQNU3MFsV3/NIZ9NJSSsKX2Qwgbg3y3bGuAu4VFIpY0beYA7Lg+gnoppeP/QLg5tdCTTZr3nNQV5w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OiwXh07oKGYmZqFGd2DZuscOxNE/VqtzziLqwJb9GlI=; b=cA/QCr7Ka5ue1ggwum2bLGMIaesbblBMXf625a0Qbeohv94/wMsAToqFCGOv1hUDEPP2meImjLNSvPG5/SZqbX9d6V5XHtJmuSIDTFsojbK+kKtKAbs3KeD4ZUDI1zu0ZTQ0L4+W9D6Db6KVLfyNirzZ4rjNUxTQ6judXUfl9u1FOgF2gt1AR9S2k2WZEPSKPF+8tSBDyeXCAXrjYZrslGPu2TQLTgBUkZ181SOeIaosF7SiNlZ7lTgTzvgkEm0TXCC4LIigWD+fkXre5+pHnte+jalemkFMelecAR/wtiAr6CTQ9Tle02s+rMfBoQlWdUHqwSbzWLf/kMfEPswopQ== Received: from DS7PR03CA0030.namprd03.prod.outlook.com (2603:10b6:5:3b8::35) by CY4PR12MB1558.namprd12.prod.outlook.com (2603:10b6:910:b::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.18; Fri, 15 Apr 2022 10:16:37 +0000 Received: from DM6NAM11FT063.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b8:cafe::5b) by DS7PR03CA0030.outlook.office365.com (2603:10b6:5:3b8::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.18 via Frontend Transport; Fri, 15 Apr 2022 10:16:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.235) by DM6NAM11FT063.mail.protection.outlook.com (10.13.172.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5164.19 via Frontend Transport; Fri, 15 Apr 2022 10:16:36 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 15 Apr 2022 10:16:35 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 15 Apr 2022 03:16:34 -0700 From: Ali Alnubani To: Subject: [PATCH 2/2] pw_maintainers_cli: write errors to stderr Date: Fri, 15 Apr 2022 13:16:11 +0300 Message-ID: <20220415101611.364-2-alialnu@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220415101611.364-1-alialnu@nvidia.com> References: <20220415101611.364-1-alialnu@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 57d1fae1-2a8b-4342-2932-08da1ec90647 X-MS-TrafficTypeDiagnostic: CY4PR12MB1558:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5uOBaV0UjuV9CpyO09mjnQsCGT7NlkfV/IJRGpSEun7/n1sxof73IoJa7RjccoFchlflfWloD9UlnjntaEAcB7B6PVNyugycy2zV25ruepj23d1TBaHToO52xvzR/FVbwpMN+zpBum8LBj+RwBD1KY3UqXk2oj09jfg/5HtVDv5VLM4h3Ui8ntWBwvyJ2ja33xAvYipfpGT2h3HJFFu/Lvb+2K1LkEGBg2lEVQ9azV3EY4gDnpchlpmLqz13gF6349FafASaxZfYp7CLd+oyG6e7iQZ2GBe/ByiSiR+n2sDitWMKPOO80NsFdHVy4hT4BhSL29lcozMTfOPHuC+GNrbYsH78Y/oQIm/jY2/YaINpV3hR8uEND//l56WMovYKg7T56SFP1CCcYwHoUJSW6/09I3R9LM7OcBe2HR4Gebtp/wQCUr42If4+cAAjJMKO4SftiMB23on+qNjumfcbzV4YmGBW8t6jKI13uyox61boDNtwO2DZKoSVXMltuxx2PO2AQzNI0ILl/N3GPUdtcBKAlFnKs8Oo6m5MeUL2ZjbwDU/k4XkMagif29j2nn0rgRIkxB/NOw+s+F9qc1hYsq1XfJkCpEPv9oWNAKbsowX5Frz3B47bZMHbK7DJ1Lkq50AQNrwoXyRIJdd5xeYgGbW1FeEH6kssRg6qQeWEQcnurtAQwqDVpKNG8ychQu7u0q+HzSrrRMPtkI8C5fE76A== X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(46966006)(40470700004)(36840700001)(82310400005)(2906002)(7696005)(1076003)(8936002)(6666004)(5660300002)(16526019)(70206006)(8676002)(26005)(86362001)(2616005)(70586007)(40460700003)(186003)(508600001)(6286002)(36860700001)(55016003)(356005)(81166007)(316002)(83380400001)(36756003)(6916009)(426003)(47076005)(336012)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2022 10:16:36.7527 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 57d1fae1-2a8b-4342-2932-08da1ec90647 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT063.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1558 X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ci-bounces@dpdk.org Redirect error messages to stderr instead of stdout and reword 2 of them. Signed-off-by: Ali Alnubani --- tools/pw_maintainers_cli.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/pw_maintainers_cli.py b/tools/pw_maintainers_cli.py index ad51e3d..a1d7d8e 100755 --- a/tools/pw_maintainers_cli.py +++ b/tools/pw_maintainers_cli.py @@ -56,7 +56,7 @@ Or if you want to use inside other scripts: MAINTAINERS_FILE_PATH = os.environ.get('MAINTAINERS_FILE_PATH') if not MAINTAINERS_FILE_PATH: - print('MAINTAINERS_FILE_PATH is not set.') + print('MAINTAINERS_FILE_PATH is not set.', file=sys.stderr) sys.exit(1) @@ -70,8 +70,7 @@ class GitPW(object): for key in conf_keys: value = conf_obj.get('pw_{}'.format(key)) if not value: - print('--pw_{} is a required git-pw configuration'.format(key)) - sys.exit(1) + sys.exit('--pw_{} is a required git-pw configuration'.format(key)) else: setattr(self.CONF, key, value) @@ -97,8 +96,8 @@ class GitPW(object): users = api.index('users', [('q', delegate)]) if len(users) != 1: # Zero or multiple users found - print('Cannot choose a Patchwork user to delegate to from ' - 'user list ({}). Skipping..'.format(users)) + print('Cannot choose a Patchwork user associated with {} to ' + 'delegate to.'.format(delegate, users), file=sys.stderr) return for patch in patch_list: if patch['delegate'] != None and \ @@ -374,11 +373,13 @@ if __name__ == '__main__': r".*\<(?P.*)\>", maintainer).group('email') except AttributeError: - print("Unexpected format: '{}'".format(maintainer)) + print("Unexpected format: '{}'".format(maintainer), + file=sys.stderr) delegate = _git_pw.set_delegate( patch_list, maintainer_email, skip_delegated=skip_delegated) if delegate != None: break else: - print('No maintainers found. Not setting a delegate.') + print('No maintainers matched. Not setting a delegate.', + file=sys.stderr) -- 2.25.1