]> code.ossystems Code Review - openembedded-core.git/commitdiff
Enhance the expansion exception message
authorChris Larson <chris_larson@mentor.com>
Tue, 20 Apr 2010 22:56:20 +0000 (15:56 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Fri, 2 Jul 2010 14:41:34 +0000 (15:41 +0100)
(Bitbake rev: 1cc11164a85a5b30d6b9184cb5a8f7f7ac1aaff2)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/data.py

index 2d04b010cd7080963a84390557e619331838f7a9..96ed6e1e4102d553396af2207f488af196c88517 100644 (file)
@@ -182,13 +182,10 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False):
         if all:
             oval = getVar(var, d, 0)
         val = getVar(var, d, 1)
-    except KeyboardInterrupt:
+    except (KeyboardInterrupt, bb.build.FuncFailed):
         raise
-    except:
-        excname = str(sys.exc_info()[0])
-        if excname == "bb.build.FuncFailed":
-            raise
-        o.write('# expansion of %s threw %s\n' % (var, excname))
+    except Exception, exc:
+        o.write('# expansion of %s threw %s: %s\n' % (var, exc.__class__.__name__, str(exc)))
         return 0
 
     if all: