diff options
author | Chris Larson <chris_larson@mentor.com> | 2011-05-06 07:15:34 -0700 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2011-05-16 12:39:42 -0700 |
commit | caf21e9fbf3c526c1d7c555d8c76dca8710f9def (patch) | |
tree | af47a0caa863bb7c4ccee432377fc66de8c9530a /lib | |
parent | 775590c154bc189df3f5704bddf9b684b734fde0 (diff) | |
download | bitbake-caf21e9fbf3c526c1d7c555d8c76dca8710f9def.tar.gz |
cooker: don't show a useless traceback for SyntaxError
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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bb/cooker.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 1a1313c32..01e6c160b 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -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) |