[yocto] [[AUH] PATCHv2 02/13] upgradehelper.py: Fix bug when buildhistory isn't enabled

Aníbal Limón anibal.limon at linux.intel.com
Wed Nov 11 14:34:18 PST 2015


Don't use buildhistory object if buildhistory_enabled is False
because cause undefined variable error.

Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
---
 upgradehelper.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/upgradehelper.py b/upgradehelper.py
index bb19b65..9b321f6 100755
--- a/upgradehelper.py
+++ b/upgradehelper.py
@@ -310,7 +310,7 @@ class Updater(object):
         for machine in self.machines:
             I(" %s: compiling for %s ..." % (self.pn, machine))
             self.recipe.compile(machine)
-            if self.buildhistory is not None:
+            if self.buildhistory_enabled == True:
                 self.buildhistory.add()
 
     def _buildhistory_diff(self):
-- 
2.1.4




More information about the yocto mailing list