summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-05-05 19:21:12 -0700
committerChris Larson <chris_larson@mentor.com>2011-05-16 12:39:42 -0700
commit775590c154bc189df3f5704bddf9b684b734fde0 (patch)
tree16af5ce2051e53473a4dcf7738f32184eecc4128
parent8c33f50eb68411c071c001331e0134aeb776953b (diff)
downloadbitbake-775590c154bc189df3f5704bddf9b684b734fde0.tar.gz
cooker: use logger.exception for config file parse errors
Signed-off-by: Chris Larson <chris_larson@mentor.com>
-rw-r--r--lib/bb/cooker.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 37daf3bb4..1a1313c32 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -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"