]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker: use logger.exception for config file parse errors
authorChris Larson <chris_larson@mentor.com>
Fri, 6 May 2011 02:21:12 +0000 (19:21 -0700)
committerChris Larson <chris_larson@mentor.com>
Mon, 16 May 2011 19:39:42 +0000 (12:39 -0700)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/bb/cooker.py

index 37daf3bb4f033ba469f9bd4536b52122a8326365..1a1313c326c2f2b1da33626d409f6904c00ada98 100644 (file)
@@ -75,7 +75,13 @@ class BBCooker:
 
         bb.data.inheritFromOS(self.configuration.data)
 
-        self.parseConfigurationFiles(self.configuration.file)
+        try:
+            self.parseConfigurationFiles(self.configuration.file)
+        except SyntaxError:
+            sys.exit(1)
+        except Exception:
+            logger.exception("Error parsing configuration files")
+            sys.exit(1)
 
         if not self.configuration.cmd:
             self.configuration.cmd = bb.data.getVar("BB_DEFAULT_TASK", self.configuration.data, True) or "build"