Better error message if 'remove-project' refers to non-existent project

If a local manifest includes a 'remove-project' element that refers to
a project that does not exist in the manifest, the error message is a
bit cryptic.

Change the error message to make it clearer what is wrong.

Change-Id: I0b1043aaec87893c3128211d3a9ab2db6d600755
This commit is contained in:
David Pursehouse 2012-11-16 19:12:32 +09:00
parent 88b86728a4
commit f91074881f

View File

@ -443,9 +443,8 @@ class XmlManifest(object):
try:
del self._projects[name]
except KeyError:
raise ManifestParseError(
'project %s not found' %
(name))
raise ManifestParseError('remove-project element specifies non-existent '
'project: %s' % name)
# If the manifest removes the hooks project, treat it as if it deleted
# the repo-hooks element too.