]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
taskdata: Fix traceback issue with missing provider
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 14 Feb 2016 10:14:22 +0000 (10:14 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 15 Feb 2016 16:47:53 +0000 (16:47 +0000)
If there is a missing provider and we're using "-k" mode alongside "-w",
we could get a traceback since there was no provider. Add tests to avoid this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/taskdata.py

index 6e4d149e5afdc8baa6c4c926377f9655e7291e70..9ae52d77dad23b32858b8eb89753a4f2ff76f664 100644 (file)
@@ -642,7 +642,9 @@ class TaskData:
             if prefix and not name.startswith(prefix):
                 continue
             if self.have_build_target(name):
-                provmap[name] = self.fn_index[self.get_provider(name)[0]]
+                provider = self.get_provider(name)
+                if provider:
+                    provmap[name] = self.fn_index[provider[0]]
         return provmap
 
     def dump_data(self):