summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r--bitbake/lib/bb/utils.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index e0ef63cd03..82dab6b542 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -216,7 +216,8 @@ def better_compile(text, file, realfile, mode = "exec"):
216 for line in body: 216 for line in body:
217 logger.error(line) 217 logger.error(line)
218 218
219 raise 219 e = bb.BBHandledException(e)
220 raise e
220 221
221def better_exec(code, context, text = None, realfile = "<code>"): 222def better_exec(code, context, text = None, realfile = "<code>"):
222 """ 223 """
@@ -231,7 +232,7 @@ def better_exec(code, context, text = None, realfile = "<code>"):
231 code = better_compile(code, realfile, realfile) 232 code = better_compile(code, realfile, realfile)
232 try: 233 try:
233 exec(code, _context, context) 234 exec(code, _context, context)
234 except Exception: 235 except Exception as e:
235 (t, value, tb) = sys.exc_info() 236 (t, value, tb) = sys.exc_info()
236 237
237 if t in [bb.parse.SkipPackage, bb.build.FuncFailed]: 238 if t in [bb.parse.SkipPackage, bb.build.FuncFailed]:
@@ -280,7 +281,8 @@ def better_exec(code, context, text = None, realfile = "<code>"):
280 nexttb = tb.tb_next 281 nexttb = tb.tb_next
281 level = level + 1 282 level = level + 1
282 283
283 raise 284 e = bb.BBHandledException(e)
285 raise e
284 286
285def simple_exec(code, context): 287def simple_exec(code, context):
286 exec(code, _context, context) 288 exec(code, _context, context)