]> 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)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 8 Jun 2011 19:38:25 +0000 (20:38 +0100)
Note: we rely on the fact that better_compile has already output information
about the exception, so don't do it ourselves.

(Bitbake rev: caf21e9fbf3c526c1d7c555d8c76dca8710f9def)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/cooker.py

index 293ad355b8d228dd95dc9af9144ebc2ab93c1163..f4836509ca23a65832c0f891e8a9e52c433ca8bb 100644 (file)
@@ -1227,7 +1227,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)