Browse Source

tinfoil: improve get_recipe_file() exception text

* Turn reasons from a list into a string (usually there will be only one
  reason, but the interface provides for more than one) and state up
  front that the recipe is unavailable for clarity
* Use quotes around invalid recipe name

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Paul Eggleton 7 years ago
parent
commit
8922f1d234
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/bb/tinfoil.py

+ 2 - 2
lib/bb/tinfoil.py

@@ -368,9 +368,9 @@ class Tinfoil:
             taskdata = bb.taskdata.TaskData(None, skiplist=skiplist)
             skipreasons = taskdata.get_reasons(pn)
             if skipreasons:
-                raise bb.providers.NoProvider(skipreasons)
+                raise bb.providers.NoProvider('%s is unavailable:\n  %s' % (pn, '  \n'.join(skipreasons)))
             else:
-                raise bb.providers.NoProvider('Unable to find any recipe file matching %s' % pn)
+                raise bb.providers.NoProvider('Unable to find any recipe file matching "%s"' % pn)
         return best[3]
 
     def get_file_appends(self, fn):