]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker: don't show a useless traceback for SyntaxError
authorChris Larson <chris_larson@mentor.com>
Fri, 6 May 2011 14:15:34 +0000 (07:15 -0700)
committerChris Larson <chris_larson@mentor.com>
Mon, 16 May 2011 19:39:42 +0000 (12:39 -0700)
Note: we rely on the fact that better_compile has already output information
about the exception, so don't do it ourselves.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/bb/cooker.py

index 1a1313c326c2f2b1da33626d409f6904c00ada98..01e6c160b6058b587e0bc3fadd0712ac92e6c6ed 100644 (file)
@@ -1127,7 +1127,10 @@ class CookerParser(object):
             self.shutdown(clean=False)
             bb.fatal('Error parsing %s: %s' %
                      (exc.recipe, bb.exceptions.to_string(exc.realexception)))
-        except Exception:
+        except SyntaxError as exc:
+            logger.error('Unable to parse %s', exc.recipe)
+            sys.exit(1)
+        except Exception as exc:
             import traceback
             etype, value, tb = sys.exc_info()
             formatted = bb.exceptions.format_extracted(value.traceback, limit=5)