Skip to contentSkip to conversation

taskdata: Fix traceback issue with missing provider

PATCH New Richard Purdie 1 participant 1 message Feb 14, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 taskdata: Fix traceback issue with missing provider

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.

bitbake/lib/bb/taskdata.py +3 -1
index 6e4d149..9ae52d7 100644
@@ -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):