manifest: improve error reporting for uncloned projects

Add a RuntimeError with a more descriptive message.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Marti Bolivar 2019-08-15 14:18:37 -07:00 committed by Carles Cufí
parent f7256dd608
commit c8d5df6dd4
1 changed files with 3 additions and 0 deletions

View File

@ -249,6 +249,9 @@ class Manifest:
del projects[MANIFEST_PROJECT_INDEX]
frozen_projects = []
for project in projects:
if not project.is_cloned():
raise RuntimeError('cannot freeze; project {} is uncloned'.
format(project.name))
sha = project.sha(QUAL_MANIFEST_REV_BRANCH)
d = project.as_dict()
d['revision'] = sha