From nobody Tue Nov 26 01:46:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+60919+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+60919+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1591661889; cv=none; d=zohomail.com; s=zohoarc; b=F5OcGAL0cjbBHrnOapJsbIe3oZhdSWVmO+UyeGLma6UTEOdYNCWqCNQE3230i6HXOgb9h83sjrlyVypNenkMpgLX3EReIL3nT2Ey9UGsHKC1GLt94q4lq2Q4z1D/CU7i6xVHhtKLVMq/+k0C36yekW9qD9WwJvs2QOS2Q25AosM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591661889; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=7kS/6nDFQljjOiKaZNzYUmS5YzUVx0GZ7zdWajahLZg=; b=R6OViG08Yp1B6u9FjiLJDozkxybr9zTC3nka5bc76T0VMNssc8S9hHG+V5I7MJUOdnYw5aq3ljDGWbqIsAML9s7n8Cfn/+uXFmymRUKVehvnmE1zrbV6zDpszzugGQq/WV9uBBXBRsWDyPnM2TmmF4rUhDgON4vP1FHOG0dEWWQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+60919+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1591661889606458.4464081766888; Mon, 8 Jun 2020 17:18:09 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 7xOPYY1788612xapROGCK9Z6; Mon, 08 Jun 2020 17:18:09 -0700 X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web11.4409.1591661888124247352 for ; Mon, 08 Jun 2020 17:18:08 -0700 IronPort-SDR: b3lvL0Kh2fdFSgTXIdXW2eaLIOtzll6JP1biPrgmbYzbCVU/UHkRQOpiyPDiyP3pWyJgydYIVB YIsdiDgXi77g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2020 17:18:06 -0700 IronPort-SDR: Z1NUO2LOmkb/4KLUSOxvN1e21WuMl0/2Hyq4iDZJm95pr1GHrC4NdDkwqx++OTZGRELJyr/hvw LJVfsRTnX7Lg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,489,1583222400"; d="scan'208";a="472785095" X-Received: from nldesimo-desk1.amr.corp.intel.com ([10.251.138.67]) by fmsmga006.fm.intel.com with ESMTP; 08 Jun 2020 17:18:06 -0700 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Ashley E Desimone , Puja Pandya , Bret Barkelew , Prince Agyeman , Erik Bjorge Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: Fix argument checks in manifest-repos Date: Mon, 8 Jun 2020 17:17:58 -0700 Message-Id: <20200609001758.2538-1-nathaniel.l.desimone@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,nathaniel.l.desimone@intel.com X-Gm-Message-State: yRTwEroy1RH4FBWQTsbiB9xGx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1591661889; bh=rDnM2nIcr4W0fnNSuzz9G9c13cf3xl/wUX9Rw+VI6VI=; h=Cc:Date:From:Reply-To:Subject:To; b=k0Gdu4B/7gxCoWWWe1j/9TqjXBj3HqaQp/4DNuxuFHQeZL6efA5ieQ0AM8ScwYgtL5P +03jHpp6p4j1eZZGa5ETWWg+oJqxFJwOop0HLNJwkfGFZLg9i49mc5gr2rZuvrWNikXEa OO4JSh3aX/U0OE7g0dwH7kXuguJ2xGmoB5Q= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Fixed a logic bug in the argument checking for the manifest-repos command. Signed-off-by: Nate DeSimone Cc: Ashley E Desimone Cc: Puja Pandya Cc: Bret Barkelew Cc: Prince Agyeman Cc: Erik Bjorge Reviewed-by: Ashley DeSimone Reviewed-by: Erik Bjorge --- edkrepo/commands/humble/manifest_repos_humble.py | 2 +- edkrepo/commands/manifest_repos_command.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/edkrepo/commands/humble/manifest_repos_humble.py b/edkrepo/com= mands/humble/manifest_repos_humble.py index 7dc8bfe..4a886a4 100644 --- a/edkrepo/commands/humble/manifest_repos_humble.py +++ b/edkrepo/commands/humble/manifest_repos_humble.py @@ -14,7 +14,7 @@ Contains user visible strings printed by the manifest_rep= os command. CFG_LIST_ENTRY =3D 'Config File: edkrepo.cfg Manifest Repository Name: {}' USER_CFG_LIST_ENTRY =3D 'Config File: edkrepo_user.cfg Manifest Repository= Name: {}' NAME_REQUIRED =3D 'The "name" argument is required to add/remove a manifes= t repository' -ADD_REQUIRED =3D 'The "name", "url", "branch" and "local-path" arguments a= re required to add a manifest repository' +ADD_REQUIRED =3D 'The "name", "url", "branch" and "path" arguments are req= uired to add a manifest repository' CANNOT_REMOVE_CFG =3D 'Manifest repositories cannot be removed from the ed= krepo.cfg file.' REMOVE_NOT_EXIST =3D 'The selected manifest repository does note exist in = the edkrepo_user.cfg file.' ALREADY_EXISTS =3D 'A manifest repository already exists with name: {}' diff --git a/edkrepo/commands/manifest_repos_command.py b/edkrepo/commands/= manifest_repos_command.py index b817662..af79f19 100644 --- a/edkrepo/commands/manifest_repos_command.py +++ b/edkrepo/commands/manifest_repos_command.py @@ -80,7 +80,7 @@ class ManifestRepos(EdkrepoCommand): =20 elif (args.action =3D=3D ('add' or 'remove')) and not args.name: raise EdkrepoInvalidParametersException(humble.NAME_REQUIRED) - elif args.action =3D=3D 'add' and not (args.branch or args.url or = args.local_path): + elif args.action =3D=3D 'add' and (not args.branch or not args.url= or not args.path): raise EdkrepoInvalidParametersException(humble.ADD_REQUIRED) elif args.action =3D=3D 'remove' and args.name and args.name in cf= g_repos: raise EdkrepoInvalidParametersException(humble.CANNOT_REMOVE_C= FG) --=20 2.26.2.windows.1 -=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 (#60919): https://edk2.groups.io/g/devel/message/60919 Mute This Topic: https://groups.io/mt/74764970/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-