From nobody Fri Mar 29 09:59:50 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+59706+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+59706+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1589586258; cv=none; d=zohomail.com; s=zohoarc; b=UOP+dMlB0w9V0/rj+fz25mS1Rp1U/DfjAQsqMmbzkyAY8kADeyviKYkLPXqtzjIEByt8JXtwwIij440WiUHbbRTyC+gEkhjOvTsj9XcQJdqij41hwLEBjjRhcp0O3WioGYVw4sNs/f6v2Lk4uQLzZoQOKszYr5qiLhTyeUbzkwY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589586258; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=YQS7eA/BjJbbraFKfcKM7EfFaJJtCG8fPlX9z4ZfYsc=; b=PD0+sn0NQKyXDZ32Bgg8vZgxn7AAAvhs5F0O75V/1PmnhjcaANUnkXB6WP18jwjST8yiCfpR6zm8uCHUBPBsfFZtWPZIKStDq4nsVrQLp/05y4IF8R3ZTPsb0HLZjKHZS4emluiwLmxG5zTCYXqZKfsJA7aFFXlw2cfzr9FoSNw= 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+59706+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 1589586258101579.1516817450956; Fri, 15 May 2020 16:44:18 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id yaZ5YY1788612xDzukh5donh; Fri, 15 May 2020 16:44:17 -0700 X-Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web11.3312.1589586256105336700 for ; Fri, 15 May 2020 16:44:16 -0700 IronPort-SDR: hsO6wMJFrrEe0mNkGeMUxenAlsFv3L9ZpGBwPND0at5/BINRVIAMjEZ8gYWtjI14GB5Odzm0lW /SruirZYSj5w== 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 orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2020 16:44:15 -0700 IronPort-SDR: 0ZAV1XFIENVMlUb0cKeiVifYdpYOTgbArS6+YkSc5WZFkKWcXiTy8c407wcT5M5reCUxwzEp/8 VSs7eksCUu5w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,396,1583222400"; d="scan'208";a="465093202" X-Received: from aedesimo-desk.amr.corp.intel.com ([10.212.18.166]) by fmsmga006.fm.intel.com with ESMTP; 15 May 2020 16:44:14 -0700 From: "Ashley E Desimone" To: devel@edk2.groups.io Cc: Nate DeSimone , Puja Pandya , Erik Bjorge , Bret Barkelew , Prince Agyeman Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: Improve clone error handling. Date: Fri, 15 May 2020 16:44:12 -0700 Message-Id: <20200515234412.18064-1-ashley.e.desimone@intel.com> 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,ashley.e.desimone@intel.com X-Gm-Message-State: h2FL1NpacSEMlT4LkVd7KaNUx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589586257; bh=i9pFQXhDFtHYCCrzG/H2gHNpofv7SXIeq7Ya2F++DJQ=; h=Cc:Date:From:Reply-To:Subject:To; b=izk4Ap5mS+VzIr6SW7BrdVuBkENTJ2t7OITAfSSN5QIwL4X5ItJHFdr8ixCoSUc3jmD uA+bedxu9AXJfwyDYCyrOlbHm53uOdCqJyM5W2soNVo6PpJnpxu2oP7l3HTGN33yZFj+1 VKinnX05UaT67QNo4R1dUn+fjJCY3J2m+0w= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Raise an invalid parameters exception when a project is not found. Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Erik Bjorge Cc: Bret Barkelew Cc: Prince Agyeman Reviewed-by: Erik Bjorge Reviewed-by: Nate DeSimone --- edkrepo/commands/clone_command.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/edkrepo/commands/clone_command.py b/edkrepo/commands/clone_com= mand.py index 179aaf7..3f2e6e1 100644 --- a/edkrepo/commands/clone_command.py +++ b/edkrepo/commands/clone_command.py @@ -17,6 +17,7 @@ from edkrepo.common.common_repo_functions import clone_re= pos, sparse_checkout, v from edkrepo.common.common_repo_functions import update_editor_config, com= binations_in_manifest from edkrepo.common.common_repo_functions import write_included_config, wr= ite_conditional_include from edkrepo.common.edkrepo_exception import EdkrepoInvalidParametersExcep= tion, EdkrepoManifestInvalidException +from edkrepo.common.edkrepo_exception import EdkrepoManifestNotFoundExcept= ion from edkrepo.common.humble import CLONE_INVALID_WORKSPACE, CLONE_INVALID_P= ROJECT_ARG, CLONE_INVALID_COMBO_ARG from edkrepo.common.humble import SPARSE_CHECKOUT, CLONE_INVALID_LOCAL_ROO= TS from edkrepo.common.workspace_maintenance.workspace_maintenance import cas= e_insensitive_single_match @@ -81,12 +82,15 @@ class CloneCommand(EdkrepoCommand): os.makedirs(workspace_dir) =20 cfg, user_cfg, conflicts =3D list_available_manifest_repos(config[= 'cfg_file'], config['user_cfg_file']) - manifest_repo, source_cfg, global_manifest_path =3D find_project_i= n_all_indices(args.ProjectNameOrManifestFile, - config['= cfg_file'], - config['= user_cfg_file'], - PROJ_NOT= _IN_REPO.format(args.ProjectNameOrManifestFile), - SOURCE_M= ANIFEST_REPO_NOT_FOUND.format(args.ProjectNameOrManifestFile), - args.sou= rce_manifest_repo) + try: + manifest_repo, source_cfg, global_manifest_path =3D find_proje= ct_in_all_indices(args.ProjectNameOrManifestFile, + config= ['cfg_file'], + config= ['user_cfg_file'], + PROJ_N= OT_IN_REPO.format(args.ProjectNameOrManifestFile), + SOURCE= _MANIFEST_REPO_NOT_FOUND.format(args.ProjectNameOrManifestFile), + args.s= ource_manifest_repo) + except EdkrepoManifestNotFoundException: + raise EdkrepoInvalidParametersException(CLONE_INVALID_PROJECT_= ARG) =20 # If this manifest is in a defined manifest repository validate th= e manifest within the manifest repo if manifest_repo in cfg: --=20 2.16.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 (#59706): https://edk2.groups.io/g/devel/message/59706 Mute This Topic: https://groups.io/mt/74239702/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-