From 49d348ce901f6ef38ae92e80d1b647560f8de5e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=AD=20Bol=C3=ADvar?= Date: Wed, 27 Nov 2019 17:05:58 -0500 Subject: [PATCH] project.py: allow main to handle errors from west init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The handling code here is cutting out a lot of useful content that's added by the exception handler in main.py, so there's no point in having it. Signed-off-by: Martí Bolívar --- src/west/commands/project.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/west/commands/project.py b/src/west/commands/project.py index 19cfcbf..ca4361f 100644 --- a/src/west/commands/project.py +++ b/src/west/commands/project.py @@ -20,8 +20,7 @@ from west.configuration import config, update_config from west import log from west import util from west.commands import WestCommand, CommandError -from west.manifest import Manifest, MalformedManifest, MalformedConfig, \ - MANIFEST_PROJECT_INDEX, ManifestProject +from west.manifest import Manifest, MANIFEST_PROJECT_INDEX, ManifestProject from west.manifest import MANIFEST_REV_BRANCH as MANIFEST_REV from west.manifest import QUAL_MANIFEST_REV_BRANCH as QUAL_MANIFEST_REV from urllib.parse import urlparse @@ -289,12 +288,7 @@ class Init(_ProjectCommand): return projects, manifest_project.abspath def projects(self, manifest_file): - try: - return Manifest.from_file(manifest_file).projects - except MalformedManifest as mm: - log.die(mm.args[0]) - except MalformedConfig as mc: - log.die(mc.args[0]) + return Manifest.from_file(manifest_file).projects def fixup_zephyr_base(self, projects): for project in projects: