Procházet zdrojové kódy

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
David Pursehouse před 13 roky
rodič
revize
f91074881f
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. 2 3
      manifest_xml.py

+ 2 - 3
manifest_xml.py

@@ -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.